33 #ifndef PPTConnection_h
34 #define PPTConnection_h 1
41 #define PPT_CHUNK_HEADER_SPACE 15
57 virtual int readBuffer(
char *inBuff,
58 const unsigned int buff_size ) ;
59 virtual int readChunkHeader(
char *inBuff,
61 virtual void sendChunk(
const string &buffer,
62 map<string,string> &extensions ) ;
63 virtual void receive( ostream &strm,
68 : _timeout( timeout ),
74 const int buff_size );
76 virtual void send(
const string &buffer ) ;
78 const string &xstr ) ;
87 virtual void send(
const string &buffer,
88 map<string,string> &extensions ) ;
91 virtual bool receive( map<string,string> &extensions,
97 virtual void dump( ostream &strm )
const ;
100 #endif // PPTConnection_h
virtual void closeConnection()=0
virtual void initConnection()=0
virtual void sendExit()
Send the exit token as an extension.
PPTConnection(int timeout)
virtual void read_extensions(map< string, string > &extensions, const string &xstr)
the string passed are extensions, read them and store the name/value pairs into the passed map ...
virtual void sendExtensions(map< string, string > &extensions)
send the specified extensions
virtual unsigned int getSendChunkSize()
virtual int readBufferNonBlocking(char *inBuff, const int buff_size)
read a buffer of data from the socket without blocking
static string PPT_EXIT_NOW
virtual unsigned int getRecvChunkSize()
virtual void dump(ostream &strm) const
dumps information about this object
virtual void send(const string &buffer)
sends the buffer to the socket