gloox
1.1-svn
|
#include <connectioncompression.h>
Public Member Functions | |
ConnectionCompression (ConnectionDataHandler *cdh, ConnectionBase *conn, const LogSink &log) | |
ConnectionCompression (ConnectionBase *conn, const LogSink &log) | |
virtual | ~ConnectionCompression () |
void | setConnectionImpl (ConnectionBase *connection) |
Public Member Functions inherited from CompressionDataHandler | |
virtual | ~CompressionDataHandler () |
virtual void | handleCompressedData (const std::string &data)=0 |
virtual void | handleDecompressedData (const std::string &data)=0 |
Public Member Functions inherited from ConnectionBase | |
ConnectionBase (ConnectionDataHandler *cdh) | |
virtual | ~ConnectionBase () |
virtual ConnectionError | connect ()=0 |
virtual ConnectionError | recv (int timeout=-1)=0 |
virtual bool | send (const std::string &data)=0 |
virtual ConnectionError | receive ()=0 |
virtual void | disconnect ()=0 |
virtual void | cleanup () |
ConnectionState | state () const |
void | registerConnectionDataHandler (ConnectionDataHandler *cdh) |
void | setServer (const std::string &server, int port=-1) |
const std::string & | server () const |
int | port () const |
virtual int | localPort () const |
virtual const std::string | localInterface () const |
virtual void | getStatistics (long int &totalIn, long int &totalOut)=0 |
virtual ConnectionBase * | newInstance () const =0 |
Additional Inherited Members | |
Protected Attributes inherited from ConnectionBase | |
ConnectionDataHandler * | m_handler |
ConnectionState | m_state |
std::string | m_server |
int | m_port |
Private Member Functions inherited from ConnectionDataHandler | |
virtual | ~ConnectionDataHandler () |
virtual void | handleReceivedData (const ConnectionBase *connection, const std::string &data)=0 |
virtual void | handleConnect (const ConnectionBase *connection)=0 |
virtual void | handleDisconnect (const ConnectionBase *connection, ConnectionError reason)=0 |
This is an implementation of a de/compressing connection.
There should be no need to use this class directly. It is used by ClientBase internally.
Definition at line 39 of file connectioncompression.h.
ConnectionCompression | ( | ConnectionDataHandler * | cdh, |
ConnectionBase * | conn, | ||
const LogSink & | log | ||
) |
Constructs a new ConnectionCompression object.
cdh | The ConnectionDataHandler that will be notified of events from this connection |
conn | A transport connection. It should be configured to connect to the server and port you wish to make the encrypted connection to. ConnectionCompression will own the transport connection and delete it in its destructor. |
logInstance | The log target. Obtain it from ClientBase::logInstance(). |
Definition at line 21 of file connectioncompression.cpp.
ConnectionCompression | ( | ConnectionBase * | conn, |
const LogSink & | log | ||
) |
Constructs a new ConnectionCompression object.
conn | A transport connection. It should be configured to connect to the server and port you wish to make the encrypted connection to. ConnectionCompression will own the transport connection and delete it in its destructor. |
logInstance | The log target. Obtain it from ClientBase::logInstance(). |
Definition at line 29 of file connectioncompression.cpp.
|
virtual |
Virtual Destructor.
Definition at line 37 of file connectioncompression.cpp.
void setConnectionImpl | ( | ConnectionBase * | connection | ) |
Sets the transport connection.
connection | The transport connection to use. |
Definition at line 43 of file connectioncompression.cpp.