#include <PPTServer.h>
Inheritance diagram for PPTServer:
Public Member Functions | |
PPTServer (ServerHandler *handler, SocketListener *listener, bool isSecure) | |
virtual | ~PPTServer () |
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 Socket * | getSocket () |
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 |
Definition at line 42 of file PPTServer.h.
PPTServer::PPTServer | ( | ServerHandler * | handler, | |
SocketListener * | listener, | |||
bool | isSecure | |||
) |
Definition at line 55 of file PPTServer.cc.
PPTServer::~PPTServer | ( | ) | [virtual] |
Definition at line 88 of file PPTServer.cc.
void PPTServer::initConnection | ( | ) | [virtual] |
Using the info passed into the SocketLister, wait for an inbound request (see SocketListener::accept()). When one is found, do the welcome message stuff (welcomeClient()) and then pass this
to the handler's handle
method. Note that this
is a pointer to a PPTServer which is a kind of Connection.
Implements PPTConnection.
Definition at line 133 of file PPTServer.cc.
References Connection::_mySock, SocketListener::accept(), and ServerHandler::handle().
Referenced by ServerApp::run().
Here is the call graph for this function:
void PPTServer::closeConnection | ( | ) | [virtual] |
Implements PPTConnection.
Definition at line 151 of file PPTServer.cc.
References Connection::_mySock, and Socket::close().
Here is the call graph for this function:
void PPTServer::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 PPTConnection.
Definition at line 247 of file PPTServer.cc.
References PPTConnection::dump(), SocketListener::dump(), ServerHandler::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
Referenced by ServerApp::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 PPTClient::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 PPTClient::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 PPTClient::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] |
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 closeConnection(), PPTClient::closeConnection(), Connection::dump(), Connection::getSocket(), initConnection(), Connection::isConnected(), PPTClient::PPTClient(), PPTConnection::readBuffer(), PPTConnection::writeBuffer(), and PPTClient::~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(), PPTClient::closeConnection(), and Connection::dump().