OPeNDAP Hyrax Back End Server (BES) Updated for version 3.8.3
|
#include <Socket.h>
Public Member Functions | |
virtual bool | allowConnection ()=0 |
virtual void | close () |
virtual void | connect ()=0 |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
virtual void | dump (ostream &strm) const =0 |
dump the contents of this object to the specified ostream | |
string | getIp () |
unsigned int | getPort () |
virtual unsigned int | getRecvBufferSize ()=0 |
virtual unsigned int | getSendBufferSize ()=0 |
virtual int | getSocketDescriptor () |
virtual bool | isConnected () |
virtual bool | isListening () |
virtual void | listen ()=0 |
virtual Socket * | newSocket (int socket, struct sockaddr *addr)=0 |
virtual int | receive (char *inBuff, const int inSize) |
virtual void | send (const string &str, int start, int end) |
Socket (int socket, struct sockaddr *addr) | |
Socket () | |
virtual void | sync () |
virtual | ~Socket () |
Protected Attributes | |
bool | _addr_set |
bool | _connected |
string | _ip |
bool | _listening |
unsigned int | _port |
int | _socket |
Socket::Socket | ( | int | socket, |
struct sockaddr * | addr | ||
) |
virtual Socket::~Socket | ( | ) | [inline, virtual] |
virtual bool Socket::allowConnection | ( | ) | [pure virtual] |
Implemented in TcpSocket, and UnixSocket.
Referenced by PPTServer::initConnection().
void Socket::close | ( | ) | [virtual] |
Reimplemented in UnixSocket.
Definition at line 81 of file Socket.cc.
References _connected, _listening, and _socket.
Referenced by PPTServer::closeConnection(), PPTClient::closeConnection(), PPTServer::initConnection(), ServerApp::terminate(), and ~Socket().
virtual void Socket::connect | ( | ) | [pure virtual] |
Implemented in TcpSocket, and UnixSocket.
Referenced by PPTClient::PPTClient().
void Socket::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 in TcpSocket, and UnixSocket.
Definition at line 136 of file Socket.cc.
References _addr_set, _connected, _ip, _listening, _port, _socket, BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
Referenced by SocketListener::dump(), and Connection::dump().
virtual void BESObj::dump | ( | ostream & | strm | ) | const [pure virtual, inherited] |
dump the contents of this object to the specified ostream
This method is implemented by all derived classes to dump their contents, in other words, any state they might have, private variables, etc...
The inline function below can be used to dump the contents of an OPeNDAOObj object. For example, the object Animal is derived from BESObj. A user could do the following:
Animal *a = new dog( "Sparky" ) ; cout << a << endl ;
And the dump method for dog could display the name passed into the constructor, the (this) pointer of the object, etc...
strm | C++ i/o stream to dump the object to |
Implemented in CmdClient, BESAbstractModule, BESAggFactory, BESAggregationServer, BESApp, BESBaseApp, BESBasicHttpTransmitter, BESBasicInterface, BESBasicTransmitter, BESCache, BESCatalog, BESCatalogDirectory, BESCatalogList, BESCatalogResponseHandler, BESCatalogUtils, BESConfigResponseHandler, BESContainer, BESContainerStorage, BESContainerStorageCatalog, BESContainerStorageFile, BESContainerStorageList, BESContainerStorageVolatile, BESContextManager, BESDapError, BESDapErrorInfo, BESDapModule, BESDapRequestHandler, BESDapResponse, BESDASResponse, BESDASResponseHandler, BESDataDDSResponse, BESDataDDXResponseHandler, BESDataHandlerInterface, BESDataResponseHandler, BESDDSResponse, BESDDSResponseHandler, BESDDXResponseHandler, BESDefine, BESDefineResponseHandler, BESDefinitionStorage, BESDefinitionStorageList, BESDefinitionStorageVolatile, BESDelContainerResponseHandler, BESDelContainersResponseHandler, BESDelDefResponseHandler, BESDelDefsResponseHandler, BESError, BESExceptionManager, BESFileContainer, BESForbiddenError, BESGlobalInit, BESHelpResponseHandler, BESHTMLInfo, BESInfo, BESInfoList, BESInitializer, BESInterface, BESInternalError, BESInternalFatalError, BESKeys, BESLog, BESMemoryGlobalArea, BESModuleApp, BESNotFoundError, BESPlugin< M >, BESPluginFactory< C >, BESProcessEncodedString, BESProcIdResponseHandler, BESReporter, BESReporterList, BESRequestHandler, BESRequestHandlerList, BESResponseHandler, BESResponseHandlerList, BESResponseObject, BESReturnManager, BESServiceRegistry, BESServicesResponseHandler, BESSetContainerResponseHandler, BESSetContextResponseHandler, BESShowContainersResponseHandler, BESShowContextResponseHandler, BESShowDefsResponseHandler, BESShowErrorResponseHandler, BESSilentInfo, BESStatusResponseHandler, BESStopWatch, BESStreamResponseHandler, BESSyntaxUserError, BESTextInfo, BESTokenizer, BESTransmitter, BESUncompressManager, BESVersionInfo, BESVersionResponseHandler, BESXMLInfo, Connection, PPTClient, PPTConnection, PPTServer, SSLClient, SSLConnection, SSLServer, and StandAloneClient.
Referenced by operator<<().
virtual unsigned int Socket::getRecvBufferSize | ( | ) | [pure virtual] |
Implemented in TcpSocket, and UnixSocket.
Referenced by PPTConnection::getRecvChunkSize(), and PPTConnection::receive().
virtual unsigned int Socket::getSendBufferSize | ( | ) | [pure virtual] |
Implemented in TcpSocket, and UnixSocket.
Referenced by PPTConnection::getSendChunkSize().
virtual int Socket::getSocketDescriptor | ( | ) | [inline, virtual] |
Definition at line 70 of file Socket.h.
References _socket.
Referenced by SocketListener::accept(), TcpSocket::allowConnection(), SocketListener::listen(), and PPTConnection::readBufferNonBlocking().
virtual bool Socket::isConnected | ( | ) | [inline, virtual] |
Definition at line 63 of file Socket.h.
References _connected.
Referenced by Connection::isConnected(), SocketListener::listen(), and PPTClient::PPTClient().
virtual bool Socket::isListening | ( | ) | [inline, virtual] |
Definition at line 65 of file Socket.h.
References _listening.
Referenced by SocketListener::listen().
virtual void Socket::listen | ( | ) | [pure virtual] |
Implemented in TcpSocket, and UnixSocket.
Referenced by SocketListener::listen().
virtual Socket* Socket::newSocket | ( | int | socket, |
struct sockaddr * | addr | ||
) | [pure virtual] |
Implemented in TcpSocket, and UnixSocket.
Referenced by SocketListener::accept().
int Socket::receive | ( | char * | inBuff, |
const int | inSize | ||
) | [virtual] |
void Socket::send | ( | const string & | str, |
int | start, | ||
int | end | ||
) | [virtual] |
void Socket::sync | ( | ) | [virtual] |
bool Socket::_addr_set [protected] |
bool Socket::_connected [protected] |
Definition at line 48 of file Socket.h.
Referenced by UnixSocket::close(), close(), UnixSocket::connect(), TcpSocket::connect(), dump(), isConnected(), UnixSocket::listen(), and TcpSocket::listen().
string Socket::_ip [protected] |
bool Socket::_listening [protected] |
Definition at line 49 of file Socket.h.
Referenced by UnixSocket::close(), close(), UnixSocket::connect(), TcpSocket::connect(), dump(), isListening(), UnixSocket::listen(), and TcpSocket::listen().
unsigned int Socket::_port [protected] |
int Socket::_socket [protected] |
Definition at line 47 of file Socket.h.
Referenced by close(), UnixSocket::connect(), TcpSocket::connect(), dump(), TcpSocket::getRecvBufferSize(), TcpSocket::getSendBufferSize(), getSocketDescriptor(), UnixSocket::listen(), TcpSocket::listen(), receive(), send(), and sync().