#include <PPTConnection.h>


Public Member Functions | |
| virtual | ~PPTConnection () |
| virtual void | initConnection ()=0 |
| virtual void | closeConnection ()=0 |
| virtual void | send (const string &buffer) |
| virtual void | sendExit () |
| virtual bool | receive (ostream *strm=0) |
| virtual void | dump (ostream &strm) const |
| dumps information about this object | |
| virtual Socket * | getSocket () |
| virtual bool | isConnected () |
| virtual void | setOutputStream (ostream *strm) |
| virtual ostream * | getOutputStream () |
| virtual void | brokenPipe () |
Protected Member Functions | |
| PPTConnection (int timeout) | |
| void | writeBuffer (const string &buffer) |
| int | readBuffer (char *inBuff) |
| int | readBufferNonBlocking (char *inBuff) |
Protected Attributes | |
| Socket * | _mySock |
| ostream * | _out |
| bool | _brokenPipe |
Definition at line 40 of file PPTConnection.h.
| PPTConnection::PPTConnection | ( | int | timeout | ) | [inline, protected] |
Definition at line 47 of file PPTConnection.h.
| virtual PPTConnection::~PPTConnection | ( | ) | [inline, virtual] |
Definition at line 54 of file PPTConnection.h.
| void PPTConnection::writeBuffer | ( | const string & | buffer | ) | [protected] |
Definition at line 63 of file PPTConnection.cc.
References Connection::_mySock, and Socket::send().
Referenced by PPTClient::initConnection(), send(), and sendExit().

| int PPTConnection::readBuffer | ( | char * | inBuff | ) | [protected] |
Definition at line 289 of file PPTConnection.cc.
References Connection::_mySock, PPT_PROTOCOL_BUFFER_SIZE, and Socket::receive().
Referenced by readBufferNonBlocking(), and receive().

| int PPTConnection::readBufferNonBlocking | ( | char * | inBuff | ) | [protected] |
Definition at line 295 of file PPTConnection.cc.
References Connection::getSocket(), Socket::getSocketDescriptor(), and readBuffer().
Referenced by PPTClient::initConnection().

| virtual void PPTConnection::initConnection | ( | ) | [pure virtual] |
| virtual void PPTConnection::closeConnection | ( | ) | [pure virtual] |
| void PPTConnection::send | ( | const string & | buffer | ) | [virtual] |
Implements Connection.
Definition at line 47 of file PPTConnection.cc.
References PPTProtocol::PPT_COMPLETE_DATA_TRANSMITION, and writeBuffer().
Referenced by CmdClient::executeCommand().

| void PPTConnection::sendExit | ( | ) | [virtual] |
Implements Connection.
Definition at line 57 of file PPTConnection.cc.
References PPTProtocol::PPT_EXIT_NOW, and writeBuffer().
Referenced by PPTClient::closeConnection().

| bool PPTConnection::receive | ( | ostream * | strm = 0 |
) | [virtual] |
Implements Connection.
Definition at line 136 of file PPTConnection.cc.
References Connection::_out, PPTMarkFinder::getMarkIndex(), PPTMarkFinder::markCheck(), PPTProtocol::PPT_COMPLETE_DATA_TRANSMITION, PPTProtocol::PPT_EXIT_NOW, PPT_PROTOCOL_BUFFER_SIZE, and readBuffer().
Referenced by CmdClient::executeCommand().

| void PPTConnection::dump | ( | ostream & | strm | ) | const [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 Connection.
Reimplemented in PPTClient, and PPTServer.
Definition at line 338 of file PPTConnection.cc.
References Connection::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
Referenced by PPTServer::dump(), and PPTClient::dump().

| virtual Socket* Connection::getSocket | ( | ) | [inline, virtual, inherited] |
Definition at line 66 of file Connection.h.
References Connection::_mySock.
Referenced by readBufferNonBlocking().
| virtual bool Connection::isConnected | ( | ) | [inline, virtual, inherited] |
Definition at line 71 of file Connection.h.
References Connection::_mySock, and Socket::isConnected().
Referenced by CmdClient::isConnected().

| virtual void Connection::setOutputStream | ( | ostream * | strm | ) | [inline, virtual, inherited] |
| virtual ostream* Connection::getOutputStream | ( | ) | [inline, virtual, inherited] |
| virtual void Connection::brokenPipe | ( | ) | [inline, virtual, inherited] |
Definition at line 87 of file Connection.h.
References Connection::_brokenPipe.
Referenced by CmdClient::brokenPipe().
Socket* Connection::_mySock [protected, inherited] |
Definition at line 48 of file Connection.h.
Referenced by PPTServer::closeConnection(), PPTClient::closeConnection(), Connection::dump(), Connection::getSocket(), PPTServer::initConnection(), Connection::isConnected(), PPTClient::PPTClient(), readBuffer(), writeBuffer(), and PPTClient::~PPTClient().
ostream* Connection::_out [protected, inherited] |
Definition at line 49 of file Connection.h.
Referenced by Connection::dump(), Connection::getOutputStream(), receive(), and Connection::setOutputStream().
bool Connection::_brokenPipe [protected, inherited] |
Definition at line 50 of file Connection.h.
Referenced by Connection::brokenPipe(), PPTClient::closeConnection(), and Connection::dump().
1.5.4