TcpSocket Class Reference

#include <TcpSocket.h>

Inheritance diagram for TcpSocket:

Inheritance graph
[legend]
Collaboration diagram for TcpSocket:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TcpSocket (const string &host, int portVal)
 TcpSocket (int portVal)
 TcpSocket (int socket, const struct sockaddr_in &f)
virtual ~TcpSocket ()
virtual void connect ()
virtual void listen ()
virtual SocketnewSocket (int socket, const struct sockaddr_in &f)
virtual void dump (ostream &strm) const
 dumps information about this object
virtual bool isConnected ()
virtual bool isListening ()
virtual void close ()
virtual void send (const string &str, int start, int end)
virtual int receive (char *inBuff, int inSize)
virtual int getSocketDescriptor ()

Protected Attributes

int _socket
bool _connected
bool _listening
sockaddr_in _from
bool _addr_set

Detailed Description

Definition at line 42 of file TcpSocket.h.


Constructor & Destructor Documentation

TcpSocket::TcpSocket ( const string &  host,
int  portVal 
) [inline]

Definition at line 48 of file TcpSocket.h.

Referenced by newSocket().

TcpSocket::TcpSocket ( int  portVal  )  [inline]

Definition at line 52 of file TcpSocket.h.

TcpSocket::TcpSocket ( int  socket,
const struct sockaddr_in &  f 
) [inline]

Definition at line 56 of file TcpSocket.h.

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

Definition at line 61 of file TcpSocket.h.


Member Function Documentation

void TcpSocket::connect (  )  [virtual]

Implements Socket.

Definition at line 47 of file TcpSocket.cc.

References Socket::_connected, Socket::_listening, and Socket::_socket.

void TcpSocket::listen (  )  [virtual]

Implements Socket.

Definition at line 248 of file TcpSocket.cc.

References Socket::_connected, Socket::_listening, and Socket::_socket.

virtual Socket* TcpSocket::newSocket ( int  socket,
const struct sockaddr_in &  f 
) [inline, virtual]

Implements Socket.

Definition at line 65 of file TcpSocket.h.

References TcpSocket().

Here is the call graph for this function:

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

Definition at line 345 of file TcpSocket.cc.

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

Referenced by ServerApp::dump().

Here is the call graph for this function:

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

Definition at line 66 of file Socket.h.

References Socket::_connected.

Referenced by Connection::isConnected(), SocketListener::listen(), and PPTClient::PPTClient().

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

Definition at line 68 of file Socket.h.

References Socket::_listening.

Referenced by SocketListener::listen().

void Socket::close (  )  [virtual, inherited]

Reimplemented in UnixSocket.

Definition at line 40 of file Socket.cc.

References Socket::_connected, Socket::_listening, and Socket::_socket.

Referenced by UnixSocket::close(), PPTServer::closeConnection(), PPTClient::closeConnection(), ServerApp::terminate(), and Socket::~Socket().

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

Definition at line 52 of file Socket.cc.

References Socket::_socket.

Referenced by PPTConnection::writeBuffer().

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

Definition at line 67 of file Socket.cc.

References Socket::_socket.

Referenced by PPTConnection::readBuffer().

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

Definition at line 72 of file Socket.h.

References Socket::_socket.

Referenced by SocketListener::listen(), and PPTConnection::readBufferNonBlocking().


Member Data Documentation

int Socket::_socket [protected, inherited]

Definition at line 47 of file Socket.h.

Referenced by Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::getSocketDescriptor(), UnixSocket::listen(), listen(), Socket::receive(), and Socket::send().

bool Socket::_connected [protected, inherited]

Definition at line 48 of file Socket.h.

Referenced by UnixSocket::close(), Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::isConnected(), UnixSocket::listen(), and listen().

bool Socket::_listening [protected, inherited]

Definition at line 49 of file Socket.h.

Referenced by UnixSocket::close(), Socket::close(), UnixSocket::connect(), connect(), Socket::dump(), Socket::isListening(), UnixSocket::listen(), and listen().

struct sockaddr_in Socket::_from [read, protected, inherited]

Definition at line 50 of file Socket.h.

Referenced by Socket::dump().

bool Socket::_addr_set [protected, inherited]

Definition at line 51 of file Socket.h.

Referenced by Socket::dump().


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