bes Updated for version 3.20.13
|
Public Member Functions | |
virtual void | brokenPipe () |
virtual void | closeConnection () |
virtual void | dump (std::ostream &strm) const |
dumps information about this object | |
virtual std::string | exit () |
virtual std::ostream * | getOutputStream () |
virtual unsigned int | getRecvChunkSize () |
virtual unsigned int | getSendChunkSize () |
virtual Socket * | getSocket () |
virtual void | initConnection () |
virtual bool | isConnected () |
PPTClient (const string &hostStr, int portVal, int timeout) | |
PPTClient (const string &unix_socket, int timeout) | |
virtual bool | receive (std::map< std::string, std::string > &extensions, std::ostream *strm=0) |
receive a chunk of either extensions into the specified map or data into the specified stream | |
virtual void | send (const std::string &buffer, std::map< std::string, std::string > &extensions) |
Send a message to the server. | |
virtual void | sendExit () |
Send the exit token as an extension. | |
virtual void | sendExtensions (std::map< std::string, std::string > &extensions) |
send the specified extensions | |
virtual void | setOutputStream (std::ostream *strm) |
Protected Member Functions | |
virtual void | read_extensions (std::map< std::string, std::string > &extensions, const std::string &xstr) |
the string passed are extensions, read them and store the name/value pairs into the passed map | |
virtual int | readBuffer (char *inBuff, const unsigned int buff_size) |
read a buffer of data from the socket | |
virtual int | readBufferNonBlocking (char *inBuff, const int buff_size) |
read a buffer of data from the socket without blocking | |
virtual void | send (const std::string &buffer) |
sends the buffer to the socket | |
Protected Attributes | |
bool | _brokenPipe |
Socket * | _mySock |
std::ostream * | _out |
Definition at line 40 of file PPTClient.h.
Definition at line 57 of file PPTClient.cc.
PPTClient::PPTClient | ( | const string & | unix_socket, |
int | timeout | ||
) |
Definition at line 69 of file PPTClient.cc.
PPTClient::~PPTClient | ( | ) |
Definition at line 107 of file PPTClient.cc.
|
inlinevirtualinherited |
Definition at line 92 of file Connection.h.
|
virtual |
Implements PPTConnection.
Definition at line 221 of file PPTClient.cc.
|
virtual |
dumps information about this object
Displays the pointer value of this instance
strm | C++ i/o stream to dump the information to |
Reimplemented from PPTConnection.
Definition at line 253 of file PPTClient.cc.
|
inlinevirtualinherited |
Implements Connection.
Definition at line 78 of file PPTConnection.h.
|
inlinevirtualinherited |
Definition at line 87 of file Connection.h.
|
virtualinherited |
Implements Connection.
Definition at line 456 of file PPTConnection.cc.
|
virtualinherited |
Implements Connection.
Definition at line 461 of file PPTConnection.cc.
|
inlinevirtualinherited |
Definition at line 72 of file Connection.h.
|
virtual |
Implements PPTConnection.
Definition at line 121 of file PPTClient.cc.
|
inlinevirtualinherited |
Definition at line 77 of file Connection.h.
|
protectedvirtualinherited |
the string passed are extensions, read them and store the name/value pairs into the passed map
It has already been determined that extensions were read in the chunk. Deconstruct the name/value pairs and store them into the map passed. Each extension ends with a semicolon.
extensions | map to store the name/value pairs in |
xstr | string of extensions in the form *(name[=value];) |
Definition at line 373 of file PPTConnection.cc.
|
protectedvirtualinherited |
read a buffer of data from the socket
buffer | buffer to store the data received from the socket in |
buffer_size | max size of the data to be received |
Definition at line 209 of file PPTConnection.cc.
|
protectedvirtualinherited |
read a buffer of data from the socket without blocking
Try to read a buffer of data without blocking. We will try _timeout times, waiting 1000 milliseconds between each try. The variable _timeout is passed into the constructor.
inBuff | buffer to store the data into |
buffer_size | the size of the passed buffer |
Definition at line 421 of file PPTConnection.cc.
|
virtualinherited |
receive a chunk of either extensions into the specified map or data into the specified stream
This receive will read a chunk of information from the socket and determine if what is read are extensions, where they are stored in the extensions map passed, or data, which is written to the specified stream
The first 7 bytes is the length of the information that was passed. The 5th character is either the character 'x', signifying that extensions were sent, or 'd', signifying that data was sent.
extensions | map to store the name/value paris into |
strm | output stream to write the received data into |
Implements Connection.
Definition at line 258 of file PPTConnection.cc.
|
protectedvirtualinherited |
sends the buffer to the socket
the buffer includes the length, extensions, data, whatever is to be sent
buffer | data buffer to send to the socket |
Implements Connection.
Definition at line 190 of file PPTConnection.cc.
|
virtualinherited |
Send a message to the server.
Sends the specified message buffer to the server followed by a buffer of length 0 to signify the end of the message
A buffer sent to the server will follow the following form:
If there are extensions then they are sent first. The length of the extensions is sent first, followed by the character 'x', and then the extensions in the format name[=value];
Then the buffer itself is sent. The length of the buffer is sent followed by the character 'd' signifying data is being transmitted.
if the buffer is empty then this represents the last chunk
buffer | buffer of data to send |
extensions | list of name/value pairs sent |
Implements Connection.
Definition at line 109 of file PPTConnection.cc.
|
virtualinherited |
Send the exit token as an extension.
Implements Connection.
Definition at line 125 of file PPTConnection.cc.
|
virtualinherited |
send the specified extensions
extensions | name/value paris to be sent |
Implements Connection.
Definition at line 162 of file PPTConnection.cc.
|
inlinevirtualinherited |
Definition at line 83 of file Connection.h.
|
protectedinherited |
Definition at line 47 of file Connection.h.
|
protectedinherited |
Definition at line 45 of file Connection.h.
|
protectedinherited |
Definition at line 46 of file Connection.h.