14 #ifndef CONNECTIONTCPBASE_H__
15 #define CONNECTIONTCPBASE_H__
18 #include "connectionbase.h"
64 const std::string& server,
int port = -1 );
72 virtual bool send(
const std::string& data );
78 virtual void disconnect();
81 virtual void cleanup();
84 virtual void getStatistics(
long int &totalIn,
long int &totalOut );
91 int socket()
const {
return m_socket; }
105 virtual int localPort()
const;
111 virtual const std::string localInterface()
const;
115 void init(
const std::string& server,
int port );
116 bool dataAvailable(
int timeout = -1 );
125 long int m_totalBytesIn;
126 long int m_totalBytesOut;
134 #endif // CONNECTIONTCPBASE_H__
An abstract base class for a connection.
A simple implementation of mutex as a wrapper around a pthread mutex or a win32 critical section...
This is an abstract base class to receive events from a ConnectionBase-derived object.
This is a base class for a simple TCP connection.
The namespace for the gloox library.
void setSocket(int socket)
An implementation of log sink and source.