PPTClient Class Reference

#include <PPTClient.h>

Inheritance diagram for PPTClient:

Inheritance graph
[legend]
Collaboration diagram for PPTClient:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PPTClient (const string &hostStr, int portVal, int timeout)
 PPTClient (const string &unix_socket, int timeout)
 ~PPTClient ()
virtual void initConnection ()
virtual void closeConnection ()
virtual void dump (ostream &strm) const
 dumps information about this object
virtual void send (const string &buffer)
virtual void sendExit ()
virtual bool receive (ostream *strm=0)
virtual SocketgetSocket ()
virtual bool isConnected ()
virtual void setOutputStream (ostream *strm)
virtual ostream * getOutputStream ()
virtual void brokenPipe ()

Protected Member Functions

void writeBuffer (const string &buffer)
int readBuffer (char *inBuff)
int readBufferNonBlocking (char *inBuff)

Protected Attributes

Socket_mySock
ostream * _out
bool _brokenPipe

Detailed Description

Definition at line 40 of file PPTClient.h.


Constructor & Destructor Documentation

PPTClient::PPTClient ( const string &  hostStr,
int  portVal,
int  timeout 
)

Definition at line 56 of file PPTClient.cc.

References Connection::_mySock, Socket::connect(), and Socket::isConnected().

Here is the call graph for this function:

PPTClient::PPTClient ( const string &  unix_socket,
int  timeout 
)

Definition at line 68 of file PPTClient.cc.

References Connection::_mySock, and Socket::connect().

Here is the call graph for this function:

PPTClient::~PPTClient (  ) 

Definition at line 97 of file PPTClient.cc.

References Connection::_mySock, and closeConnection().

Here is the call graph for this function:


Member Function Documentation

void PPTClient::initConnection (  )  [virtual]

Implements PPTConnection.

Definition at line 111 of file PPTClient.cc.

References PPTException::getMessage(), PPT_PROTOCOL_BUFFER_SIZE, PPTProtocol::PPT_PROTOCOL_UNDEFINED, PPTProtocol::PPTCLIENT_TESTING_CONNECTION, PPTProtocol::PPTSERVER_AUTHENTICATE, PPTProtocol::PPTSERVER_CONNECTION_OK, PPTConnection::readBufferNonBlocking(), and PPTConnection::writeBuffer().

Referenced by CmdClient::startClient().

Here is the call graph for this function:

void PPTClient::closeConnection (  )  [virtual]

Implements PPTConnection.

Definition at line 186 of file PPTClient.cc.

References Connection::_brokenPipe, Connection::_mySock, Socket::close(), PPTException::getMessage(), and PPTConnection::sendExit().

Referenced by CmdClient::shutdownClient(), and ~PPTClient().

Here is the call graph for this function:

void PPTClient::dump ( ostream &  strm  )  const [virtual]

dumps information about this object

Displays the pointer value of this instance

Parameters:
strm C++ i/o stream to dump the information to

Reimplemented from PPTConnection.

Definition at line 218 of file PPTClient.cc.

References PPTConnection::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Referenced by CmdClient::dump().

Here is the call graph for this function:

void PPTConnection::writeBuffer ( const string &  buffer  )  [protected, inherited]

Definition at line 63 of file PPTConnection.cc.

References Connection::_mySock, and Socket::send().

Referenced by initConnection(), PPTConnection::send(), and PPTConnection::sendExit().

Here is the call graph for this function:

int PPTConnection::readBuffer ( char *  inBuff  )  [protected, inherited]

Definition at line 289 of file PPTConnection.cc.

References Connection::_mySock, PPT_PROTOCOL_BUFFER_SIZE, and Socket::receive().

Referenced by PPTConnection::readBufferNonBlocking(), and PPTConnection::receive().

Here is the call graph for this function:

int PPTConnection::readBufferNonBlocking ( char *  inBuff  )  [protected, inherited]

Definition at line 295 of file PPTConnection.cc.

References Connection::getSocket(), Socket::getSocketDescriptor(), and PPTConnection::readBuffer().

Referenced by initConnection().

Here is the call graph for this function:

void PPTConnection::send ( const string &  buffer  )  [virtual, inherited]

Implements Connection.

Definition at line 47 of file PPTConnection.cc.

References PPTProtocol::PPT_COMPLETE_DATA_TRANSMITION, and PPTConnection::writeBuffer().

Referenced by CmdClient::executeCommand().

Here is the call graph for this function:

void PPTConnection::sendExit (  )  [virtual, inherited]

Implements Connection.

Definition at line 57 of file PPTConnection.cc.

References PPTProtocol::PPT_EXIT_NOW, and PPTConnection::writeBuffer().

Referenced by closeConnection().

Here is the call graph for this function:

bool PPTConnection::receive ( ostream *  strm = 0  )  [virtual, inherited]

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 PPTConnection::readBuffer().

Referenced by CmdClient::executeCommand().

Here is the call graph for this function:

virtual Socket* Connection::getSocket (  )  [inline, virtual, inherited]

Definition at line 66 of file Connection.h.

References Connection::_mySock.

Referenced by PPTConnection::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().

Here is the call graph for this function:

virtual void Connection::setOutputStream ( ostream *  strm  )  [inline, virtual, inherited]

Definition at line 78 of file Connection.h.

References Connection::_out.

virtual ostream* Connection::getOutputStream (  )  [inline, virtual, inherited]

Definition at line 82 of file Connection.h.

References Connection::_out.

virtual void Connection::brokenPipe (  )  [inline, virtual, inherited]

Definition at line 87 of file Connection.h.

References Connection::_brokenPipe.

Referenced by CmdClient::brokenPipe().


Member Data Documentation

Socket* Connection::_mySock [protected, inherited]

Definition at line 48 of file Connection.h.

Referenced by PPTServer::closeConnection(), closeConnection(), Connection::dump(), Connection::getSocket(), PPTServer::initConnection(), Connection::isConnected(), PPTClient(), PPTConnection::readBuffer(), PPTConnection::writeBuffer(), and ~PPTClient().

ostream* Connection::_out [protected, inherited]

Definition at line 49 of file Connection.h.

Referenced by Connection::dump(), Connection::getOutputStream(), PPTConnection::receive(), and Connection::setOutputStream().

bool Connection::_brokenPipe [protected, inherited]

Definition at line 50 of file Connection.h.

Referenced by Connection::brokenPipe(), closeConnection(), and Connection::dump().


The documentation for this class was generated from the following files:
Generated on Wed Aug 29 03:24:56 2007 for OPeNDAP Back End Server (BES) by  doxygen 1.5.2