#include <connectiontcpbase.h>
Inherits ConnectionBase.
Inherited by ConnectionTCPClient, and ConnectionTCPServer.
Inheritance diagram for ConnectionTCPBase:

Public Member Functions | |
| 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) |
You should not need to use this class directly.
Definition at line 37 of file connectiontcpbase.h.
|
||||||||||||||||
|
Constructs a new ConnectionTCPBase object.
Definition at line 48 of file connectiontcpbase.cpp. |
|
||||||||||||||||||||
|
Constructs a new ConnectionTCPBase object.
Definition at line 57 of file connectiontcpbase.cpp. |
|
|
Virtual destructor Definition at line 74 of file connectiontcpbase.cpp. |
|
|
This function is called after a disconnect to clean up internal state. It is also called by ConnectionBase's destructor. Reimplemented from ConnectionBase. Definition at line 152 of file connectiontcpbase.cpp. |
|
|
Disconnects an established connection. NOOP if no active connection exists. Implements ConnectionBase. Definition at line 81 of file connectiontcpbase.cpp. |
|
||||||||||||
|
Returns current connection statistics.
Implements ConnectionBase. Definition at line 146 of file connectiontcpbase.cpp. |
|
|
Use this function to put the connection into 'receive mode', i.e. this function returns only when the connection is terminated.
Implements ConnectionBase. Definition at line 105 of file connectiontcpbase.cpp. |
|
|
Use this function to send a string of data over the wire. The function returns only after all data has been sent.
Implements ConnectionBase. Definition at line 116 of file connectiontcpbase.cpp. |
|
|
This function allows to set an existing socket with an established connection to use in this connection. You will still need to call connect() in order to negotiate the XMPP stream. You should not set a new socket after having called connect().
Definition at line 96 of file connectiontcpbase.h. |
|
|
Gives access to the raw socket of this connection. Use it wisely. You can select()/poll() it and use ConnectionTCPBase::recv( -1 ) to fetch the data.
Definition at line 88 of file connectiontcpbase.h. |
1.4.1