|
gloox
0.9.9.12
|
#include <connectiontcpserver.h>


Public Member Functions | |
| ConnectionTCPServer (ConnectionHandler *ch, const LogSink &logInstance, const std::string &ip, int port) | |
| virtual | ~ConnectionTCPServer () |
| virtual ConnectionError | recv (int timeout=-1) |
| virtual ConnectionError | connect () |
| virtual ConnectionBase * | newInstance () const |
Public Member Functions inherited from ConnectionTCPBase | |
| ConnectionTCPBase (const LogSink &logInstance, const std::string &server, int port=-1) | |
| ConnectionTCPBase (ConnectionDataHandler *cdh, const LogSink &logInstance, const std::string &server, int port=-1) | |
| virtual | ~ConnectionTCPBase () |
| virtual bool | send (const std::string &data) |
| virtual ConnectionError | receive () |
| virtual void | disconnect () |
| virtual void | cleanup () |
| virtual void | getStatistics (int &totalIn, int &totalOut) |
| int | socket () const |
| void | setSocket (int socket) |
Public Member Functions inherited from ConnectionBase | |
| ConnectionBase (ConnectionDataHandler *cdh) | |
| virtual | ~ConnectionBase () |
| ConnectionState | state () const |
| void | registerConnectionDataHandler (ConnectionDataHandler *cdh) |
| void | setServer (const std::string &server, int port=-1) |
| const std::string & | server () const |
This is an implementation of a simple listening TCP connection.
You should not need to use this class directly.
Definition at line 36 of file connectiontcpserver.h.
| ConnectionTCPServer | ( | ConnectionHandler * | ch, |
| const LogSink & | logInstance, | ||
| const std::string & | ip, | ||
| int | port | ||
| ) |
Constructs a new ConnectionTCPServer object.
| ch | An ConnectionHandler-derived object that will handle incoming connections. |
| logInstance | The log target. Obtain it from ClientBase::logInstance(). |
| ip | The local IP address to listen on. This must not be a hostname. Leave this empty to listen on all local interfaces. |
| port | The port to listen on. |
Definition at line 58 of file connectiontcpserver.cpp.
|
virtual |
Virtual destructor
Definition at line 65 of file connectiontcpserver.cpp.
|
virtual |
This function actually starts listening on the port given in the constructor.
Implements ConnectionBase.
Definition at line 74 of file connectiontcpserver.cpp.
|
virtual |
This function returns a new instance of the current ConnectionBase-derived object. The idea is to be able to 'clone' ConnectionBase-derived objects without knowing of what type they are exactly.
Implements ConnectionBase.
Definition at line 69 of file connectiontcpserver.cpp.
|
virtual |
Use this periodically to receive data from the socket and to feed the parser.
| timeout | The timeout to use for select in microseconds. Default of -1 means blocking. |
Implements ConnectionBase.
Definition at line 105 of file connectiontcpserver.cpp.
1.8.1.2