gloox  1.1-svn
Public Member Functions | List of all members
ConnectionCompression Class Reference

#include <connectioncompression.h>

Inheritance diagram for ConnectionCompression:
Inheritance graph
[legend]

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 ConnectionBasenewInstance () const =0

Additional Inherited Members

- Protected Attributes inherited from ConnectionBase
ConnectionDataHandlerm_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

Detailed Description

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.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
1.1

Definition at line 39 of file connectioncompression.h.

Constructor & Destructor Documentation

ConnectionCompression ( ConnectionDataHandler cdh,
ConnectionBase conn,
const LogSink log 
)

Constructs a new ConnectionCompression object.

Parameters
cdhThe ConnectionDataHandler that will be notified of events from this connection
connA 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.
logInstanceThe 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.

Parameters
connA 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.
logInstanceThe log target. Obtain it from ClientBase::logInstance().

Definition at line 29 of file connectioncompression.cpp.

~ConnectionCompression ( )
virtual

Virtual Destructor.

Definition at line 37 of file connectioncompression.cpp.

Member Function Documentation

void setConnectionImpl ( ConnectionBase connection)

Sets the transport connection.

Parameters
connectionThe transport connection to use.

Definition at line 43 of file connectioncompression.cpp.


The documentation for this class was generated from the following files: