14 #ifndef BYTESTREAM_H__
15 #define BYTESTREAM_H__
25 class BytestreamDataHandler;
57 const std::string& sid )
58 : m_handler( 0 ), m_logInstance( logInstance ), m_initiator( initiator ), m_target( target ),
59 m_type( type ), m_sid( sid ), m_open( false )
72 bool isOpen()
const {
return m_open; }
99 virtual bool send(
const std::string& data ) = 0;
114 const std::string&
sid()
const {
return m_sid; }
A virtual interface that allows implementors to receive data sent over a SOCKS5 Bytestream as defined...
An abstraction of a single bytestream.
void registerBytestreamDataHandler(BytestreamDataHandler *bdh)
void removeBytestreamDataHandler()
const JID & target() const
Bytestream(StreamType type, LogSink &logInstance, const JID &initiator, const JID &target, const std::string &sid)
const std::string & sid() const
virtual ConnectionError recv(int timeout=-1)=0
virtual bool send(const std::string &data)=0
BytestreamDataHandler * m_handler
const LogSink & m_logInstance
const JID & initiator() const
An implementation of log sink and source.
The namespace for the gloox library.