|
gloox
1.0
|
#include <socks5bytestreamserver.h>

Public Member Functions | |
| SOCKS5BytestreamServer (const LogSink &logInstance, int port, const std::string &ip=EmptyString) | |
| ~SOCKS5BytestreamServer () | |
| ConnectionError | listen () |
| ConnectionError | recv (int timeout) |
| void | stop () |
| int | localPort () const |
| const std::string | localInterface () const |
| virtual void | handleIncomingConnection (ConnectionBase *server, ConnectionBase *connection) |
| virtual void | handleReceivedData (const ConnectionBase *connection, const std::string &data) |
| virtual void | handleConnect (const ConnectionBase *connection) |
| virtual void | handleDisconnect (const ConnectionBase *connection, ConnectionError reason) |
Public Member Functions inherited from ConnectionHandler | |
| virtual | ~ConnectionHandler () |
Public Member Functions inherited from ConnectionDataHandler | |
| virtual | ~ConnectionDataHandler () |
A server listening for SOCKS5 bytestreams.
Definition at line 37 of file socks5bytestreamserver.h.
| SOCKS5BytestreamServer | ( | const LogSink & | logInstance, |
| int | port, | ||
| const std::string & | ip = EmptyString |
||
| ) |
Constructs a new SOCKS5BytestreamServer.
| logInstance | A LogSink to use. |
| port | The local port to listen on. |
| ip | The local IP to bind to. If empty, the server will listen on all local interfaces. |
Definition at line 22 of file socks5bytestreamserver.cpp.
Destructor.
Definition at line 29 of file socks5bytestreamserver.cpp.
|
virtual |
This function is called when e.g. the raw TCP connection was established.
| connection | The connection. |
Implements ConnectionDataHandler.
Definition at line 208 of file socks5bytestreamserver.cpp.
|
virtual |
This connection is called when e.g. the raw TCP connection was closed.
| connection | The connection. |
| reason | The reason for the disconnect. |
Implements ConnectionDataHandler.
Definition at line 213 of file socks5bytestreamserver.cpp.
|
virtual |
This function is called to receive an incoming connection.
| server | The server that the connection was made to. |
| connection | The incoming connection. |
Implements ConnectionHandler.
Definition at line 124 of file socks5bytestreamserver.cpp.
|
virtual |
This function is called for received from the underlying transport.
| connection | The connection that received the data. |
| data | The data received. |
Implements ConnectionDataHandler.
Definition at line 132 of file socks5bytestreamserver.cpp.
| ConnectionError listen | ( | ) |
Starts listening on the specified interface and port.
ConnNoError on success, ConnIoError on failure (e.g. if the port is already in use). Definition at line 39 of file socks5bytestreamserver.cpp.
| const std::string localInterface | ( | ) | const |
Expose our TCP Connection localInterface Returns the locally bound IP address.
Definition at line 85 of file socks5bytestreamserver.cpp.
| int localPort | ( | ) | const |
Expose our TCP Connection localPort Returns the local port.
Definition at line 77 of file socks5bytestreamserver.cpp.
| ConnectionError recv | ( | int | timeout | ) |
Call this function repeatedly to check for incoming connections and to negotiate them.
| timeout | The timeout to use for select in microseconds. |
Definition at line 47 of file socks5bytestreamserver.cpp.
| void stop | ( | ) |
Stops listening and unbinds from the interface and port.
Definition at line 68 of file socks5bytestreamserver.cpp.
1.8.1.2