#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 (long int &totalIn, long int &totalOut) |
| int | socket () const |
| void | setSocket (int socket) |
| virtual int | localPort () const |
| virtual const std::string | localInterface () const |
You should not need to use this class directly.
Definition at line 40 of file connectiontcpbase.h.
|
||||||||||||||||
|
Constructs a new ConnectionTCPBase object.
Definition at line 47 of file connectiontcpbase.cpp. |
|
||||||||||||||||||||
|
Constructs a new ConnectionTCPBase object.
Definition at line 56 of file connectiontcpbase.cpp. |
|
|
Virtual destructor Definition at line 73 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 149 of file connectiontcpbase.cpp. |
|
|
Disconnects an established connection. NOOP if no active connection exists. Implements ConnectionBase. Definition at line 80 of file connectiontcpbase.cpp. |
|
||||||||||||
|
Returns current connection statistics.
Implements ConnectionBase. Definition at line 143 of file connectiontcpbase.cpp. |
|
|
Returns the locally bound IP address.
Reimplemented from ConnectionBase. Definition at line 185 of file connectiontcpbase.cpp. |
|
|
Returns the local port.
Reimplemented from ConnectionBase. Definition at line 175 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 106 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 117 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 99 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 91 of file connectiontcpbase.h. |
1.4.1