#include <tcpsocket.h>
Inheritance diagram for TCPSocket::

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.
|
|
|
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.
|
|
|
Open a connection on the specified "port" for listening (Server-side call).
|
|
|
Total number of bytes received through the TCPSocket class.
Reimplemented in DataClient, and DataServer. |
|
|
Total number of bytes sent through the TCPSocket class.
Reimplemented in DataClient, and DataServer. |
|
|
Disconnect/close client connection from server (Client-side call).
|
|
||||||||||||
|
Connect to "server" on "port" (Client-side call).
Reimplemented in DataClient. |
|
|
Stop listening on "port" established by Bind() (Server-side call).
|
|
|
Listen on the "port" established by Bind() (Server-side call).
|
|
|
Operator overloading for copying TCPSocket structure.
|
|
|
Name of the peer machine to which the connection has been established ((Both client/server can call).
|
|
|
Port of the peer machine to which the connection has been established (Both client/server can call).
|
|
||||||||||||
|
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.
|
|
|
Network bandwidth (in Mbps) for data received.
Reimplemented in DataClient, and DataServer. |
|
|
Time to receive BytesRecd() bytes of data (in ms).
Reimplemented in DataClient, and DataServer. |
|
||||||||||||
|
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.
|
|
|
Network bandwidth (in Mbps) for data sent.
Reimplemented in DataClient, and DataServer. |
|
|
Time to send BytesSent() bytes of data (in ms).
Reimplemented in DataClient, and DataServer. |
|
|
Name of the machine from which the connection is being initiated (Both client/server can call).
|
|
|
Port from which the connection is being initiated (Both client/server can call).
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001