13 #ifndef CONNECTIONBOSH_H__
14 #define CONNECTIONBOSH_H__
17 #include "connectionbase.h"
19 #include "taghandler.h"
83 const std::string& xmppServer,
int xmppPort = 5222 );
99 const LogSink& logInstance,
const std::string& boshHost,
100 const std::string& xmppServer,
int xmppPort = 5222 );
122 void setServer(
const std::string& xmppHost,
unsigned short xmppPort = 5222 )
123 { m_server = xmppHost; m_port = xmppPort; }
130 void setPath(
const std::string& path ) { m_path = path; }
148 virtual bool send(
const std::string& data );
154 virtual void disconnect();
157 virtual void cleanup();
160 virtual void getStatistics(
long int& totalIn,
long int& totalOut );
163 virtual void handleReceivedData(
const ConnectionBase* connection,
const std::string& data );
175 virtual void handleTag(
Tag* tag );
179 void initInstance(
ConnectionBase* connection,
const std::string& xmppServer,
const int xmppPort );
180 bool sendRequest(
const std::string& xml );
182 const std::string getHTTPField(
const std::string& field );
185 void putConnection();
191 std::string m_boshHost;
192 std::string m_boshedHost;
199 bool m_initialStreamSent;
201 int m_maxOpenRequests;
205 bool m_streamRestart;
207 time_t m_lastRequestTime;
208 unsigned long m_minTimePerRequest;
210 std::string m_buffer;
211 std::string m_bufferHeader;
212 std::string::size_type m_bufferContentLength;
214 std::string m_sendBuffer;
216 typedef std::list<ConnectionBase*> ConnectionList;
217 ConnectionList m_activeConnections;
218 ConnectionList m_connectionPool;
225 #endif // CONNECTIONBOSH_H__
An abstract base class for a connection.
void setServer(const std::string &xmppHost, unsigned short xmppPort=5222)
void setPath(const std::string &path)
This class implements an XML parser.
This is an abstract base class to receive events from a ConnectionBase-derived object.
The namespace for the gloox library.
A virtual interface which can be reimplemented to receive non-XMPP Core stanzas.
This is an implementation of a BOSH (HTTP binding) connection.
void setMode(ConnMode mode)
An implementation of log sink and source.
This is an abstraction of an XML element.