Socket Class Reference

#include <Socket.h>

Inheritance diagram for Socket:

Inheritance graph
[legend]
Collaboration diagram for Socket:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Socket ()
 Socket (int socket, struct sockaddr *addr)
virtual ~Socket ()
virtual void connect ()=0
virtual bool isConnected ()
virtual void listen ()=0
virtual bool isListening ()
virtual void close ()
virtual void send (const string &str, int start, int end)
virtual int receive (char *inBuff, int inSize)
virtual void sync ()
virtual int getSocketDescriptor ()
unsigned int getPort ()
string getIp ()
virtual SocketnewSocket (int socket, struct sockaddr *addr)=0
virtual void dump (ostream &strm) const
 dumps information about this object

Protected Attributes

int _socket
bool _connected
bool _listening
string _ip
unsigned int _port
bool _addr_set


Constructor & Destructor Documentation

Socket::Socket (  )  [inline]

Socket::Socket ( int  socket,
struct sockaddr *  addr 
)

References _ip, and _port.

virtual Socket::~Socket (  )  [inline, virtual]

References close().

Here is the call graph for this function:


Member Function Documentation

virtual void Socket::connect (  )  [pure virtual]

Implemented in TcpSocket, and UnixSocket.

Referenced by PPTClient::PPTClient().

virtual bool Socket::isConnected (  )  [inline, virtual]

virtual void Socket::listen (  )  [pure virtual]

Implemented in TcpSocket, and UnixSocket.

Referenced by SocketListener::listen().

virtual bool Socket::isListening (  )  [inline, virtual]

References _listening.

Referenced by SocketListener::listen().

void Socket::close (  )  [virtual]

void Socket::send ( const string &  str,
int  start,
int  end 
) [virtual]

References _socket.

Referenced by PPTConnection::send().

int Socket::receive ( char *  inBuff,
int  inSize 
) [virtual]

References _socket.

Referenced by PPTConnection::readBuffer().

void Socket::sync (  )  [virtual]

References _socket.

Referenced by PPTConnection::send().

virtual int Socket::getSocketDescriptor (  )  [inline, virtual]

unsigned int Socket::getPort (  )  [inline]

References _port.

string Socket::getIp (  )  [inline]

References _ip.

virtual Socket* Socket::newSocket ( int  socket,
struct sockaddr *  addr 
) [pure virtual]

Implemented in TcpSocket, and UnixSocket.

Referenced by SocketListener::accept().

void Socket::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

Implements BESObj.

Reimplemented in TcpSocket, and UnixSocket.

References _addr_set, _connected, _ip, _listening, _port, _socket, BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Referenced by UnixSocket::dump(), TcpSocket::dump(), SocketListener::dump(), and Connection::dump().

Here is the call graph for this function:


Member Data Documentation

int Socket::_socket [protected]

bool Socket::_connected [protected]

bool Socket::_listening [protected]

string Socket::_ip [protected]

Referenced by dump(), getIp(), and Socket().

unsigned int Socket::_port [protected]

Referenced by dump(), getPort(), and Socket().

bool Socket::_addr_set [protected]

Referenced by dump().


The documentation for this class was generated from the following files:

Generated on Thu Sep 11 07:59:31 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.6