Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TCPSocket Class Reference

#include <tcpsocket.h>

Inheritance diagram for TCPSocket::

RemoteSocket DataClient DataServer DataServerMPI List of all members.

Public Methods

 TCPSocket ()
 Constructor. More...

 ~TCPSocket ()
 Destructor. More...

bool Bind (int port)
 Open a connection on the specified "port" for listening (Server-side call). More...

bool Listen ()
 Listen on the "port" established by Bind() (Server-side call). More...

bool Accept ()
 Accept connection from Client on "port" established by Bind() (Server-side call). This is a blocking call that returns only when a client connection on the port is detected. More...

bool Connect (char *server, int port)
 Connect to "server" on "port" (Client-side call). More...

int SendBytes (int size, const void *data)
 Send "size" bytes of data pointed by "data" (Both client/server can call). This is a blocking call which waits indefinitely until the "size" bytes of data has been sent. More...

int RecvBytes (int size, void *data)
 Recv "size" bytes of data pointed by "data" (Both client/server can call). This is a blocking call which waits indefinitely until the "size" bytes of data has been received. More...

bool Close ()
 Disconnect/close client connection from server (Client-side call). More...

bool InboundClose ()
 Stop listening on "port" established by Bind() (Server-side call). More...

char * SocketName ()
 Name of the machine from which the connection is being initiated (Both client/server can call). More...

int SocketPort ()
 Port from which the connection is being initiated (Both client/server can call). More...

char * PeerName ()
 Name of the peer machine to which the connection has been established ((Both client/server can call). More...

int PeerPort ()
 Port of the peer machine to which the connection has been established (Both client/server can call). More...

double BytesSent ()
 Total number of bytes sent through the TCPSocket class. More...

double BytesRecd ()
 Total number of bytes received through the TCPSocket class. More...

int SendTime ()
 Time to send BytesSent() bytes of data (in ms). More...

int RecvTime ()
 Time to receive BytesRecd() bytes of data (in ms). More...

double SendRate ()
 Network bandwidth (in Mbps) for data sent. More...

double RecvRate ()
 Network bandwidth (in Mbps) for data received. More...

TCPSocket & operator= (const TCPSocket &)
 Operator overloading for copying TCPSocket structure. More...


Constructor & Destructor Documentation

TCPSocket::TCPSocket  
 

Constructor.

TCPSocket::~TCPSocket  
 

Destructor.


Member Function Documentation

bool TCPSocket::Accept  
 

Accept connection from Client on "port" established by Bind() (Server-side call). This is a blocking call that returns only when a client connection on the port is detected.

bool TCPSocket::Bind int    port
 

Open a connection on the specified "port" for listening (Server-side call).

double TCPSocket::BytesRecd  
 

Total number of bytes received through the TCPSocket class.

Reimplemented in DataClient, and DataServer.

double TCPSocket::BytesSent  
 

Total number of bytes sent through the TCPSocket class.

Reimplemented in DataClient, and DataServer.

bool TCPSocket::Close  
 

Disconnect/close client connection from server (Client-side call).

bool TCPSocket::Connect char *    host,
int    port
 

Connect to "server" on "port" (Client-side call).

Reimplemented in DataClient.

bool TCPSocket::InboundClose  
 

Stop listening on "port" established by Bind() (Server-side call).

bool TCPSocket::Listen  
 

Listen on the "port" established by Bind() (Server-side call).

TCPSocket & TCPSocket::operator= const TCPSocket &    T
 

Operator overloading for copying TCPSocket structure.

char * TCPSocket::PeerName  
 

Name of the peer machine to which the connection has been established ((Both client/server can call).

int TCPSocket::PeerPort  
 

Port of the peer machine to which the connection has been established (Both client/server can call).

int TCPSocket::RecvBytes int    size,
void *    data
 

Recv "size" bytes of data pointed by "data" (Both client/server can call). This is a blocking call which waits indefinitely until the "size" bytes of data has been received.

double TCPSocket::RecvRate   [inline]
 

Network bandwidth (in Mbps) for data received.

Reimplemented in DataClient, and DataServer.

int TCPSocket::RecvTime  
 

Time to receive BytesRecd() bytes of data (in ms).

Reimplemented in DataClient, and DataServer.

int TCPSocket::SendBytes int    size,
const void *    data
 

Send "size" bytes of data pointed by "data" (Both client/server can call). This is a blocking call which waits indefinitely until the "size" bytes of data has been sent.

double TCPSocket::SendRate   [inline]
 

Network bandwidth (in Mbps) for data sent.

Reimplemented in DataClient, and DataServer.

int TCPSocket::SendTime  
 

Time to send BytesSent() bytes of data (in ms).

Reimplemented in DataClient, and DataServer.

char * TCPSocket::SocketName  
 

Name of the machine from which the connection is being initiated (Both client/server can call).

int TCPSocket::SocketPort  
 

Port from which the connection is being initiated (Both client/server can call).


The documentation for this class was generated from the following files:
Generated on Sun Jun 16 17:36:53 2002 for Anirudh's Vortex-Wake Simulation Code by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001