14 #ifndef CONNECTIONTCPBASE_H__
15 #define CONNECTIONTCPBASE_H__
18 #include "connectionbase.h"
68 const std::string& server,
int port = -1 );
76 virtual bool send(
const std::string& data );
82 virtual void disconnect();
85 virtual void cleanup();
88 virtual void getStatistics(
long int &totalIn,
long int &totalOut );
95 int socket()
const {
return m_socket; }
109 virtual int localPort()
const;
115 virtual const std::string localInterface()
const;
119 void init(
const std::string& server,
int port );
120 bool dataAvailable(
int timeout = -1 );
129 long int m_totalBytesIn;
130 long int m_totalBytesOut;
An abstract base class for a connection.
This is an abstract base class to receive events from a ConnectionBase-derived object.
This is a base class for a simple TCP connection.
void setSocket(int socket)
An implementation of log sink and source.
A simple implementation of mutex as a wrapper around a pthread mutex or a win32 critical section.
The namespace for the gloox library.