Socket which connects over TCP to a server. More...
#include <tcpclient.h>
Public Member Functions | |
TcpClient () | |
Constructor. | |
virtual | ~TcpClient () |
Destructor. | |
int | InitializeSocket (const IP4Address &ipAddress, const unsigned short port, const int stimeout=0, const int rtimeout=0) |
Creates a socket for connecting to a TCP server. | |
virtual void | Shutdown () |
Closes the socket and all sending/receiving. | |
IP4Address | GetServerAddress () const |
Socket which connects over TCP to a server.
Definition at line 57 of file tcpclient.h.
TcpClient::TcpClient | ( | ) |
Constructor.
Definition at line 50 of file tcpclient.cpp.
TcpClient::~TcpClient | ( | ) | [virtual] |
Destructor.
Definition at line 64 of file tcpclient.cpp.
IP4Address CxUtils::TcpClient::GetServerAddress | ( | ) | const [inline] |
Definition at line 67 of file tcpclient.h.
int TcpClient::InitializeSocket | ( | const IP4Address & | ipAddress, |
const unsigned short | port, | ||
const int | stimeout = 0 , |
||
const int | rtimeout = 0 |
||
) |
Creates a socket for connecting to a TCP server.
[in] | ipAddress | The computer host name/IP address to connect to. |
[in] | port | The port to use. |
[in] | stimeout | How long to wait in seconds before timeout on a send operation. [0, 32767). 0 = INFINITE. |
[in] | rtimeout | How long to wait in seconds before timeout on a recv operation. [0, 32767). 0 = INFINITE. |
Definition at line 103 of file tcpclient.cpp.
void TcpClient::Shutdown | ( | ) | [virtual] |
Closes the socket and all sending/receiving.
Reimplemented from CxUtils::Socket.
Definition at line 79 of file tcpclient.cpp.