Public Member Functions

CxUtils::TcpClient Class Reference

Socket which connects over TCP to a server. More...

#include <tcpclient.h>

Inheritance diagram for CxUtils::TcpClient:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Socket which connects over TCP to a server.

Definition at line 57 of file tcpclient.h.


Constructor & Destructor Documentation

TcpClient::TcpClient (  )

Constructor.

Definition at line 50 of file tcpclient.cpp.

TcpClient::~TcpClient (  ) [virtual]

Destructor.

Definition at line 64 of file tcpclient.cpp.


Member Function Documentation

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.

Parameters:
[in]ipAddressThe computer host name/IP address to connect to.
[in]portThe port to use.
[in]stimeoutHow long to wait in seconds before timeout on a send operation. [0, 32767). 0 = INFINITE.
[in]rtimeoutHow long to wait in seconds before timeout on a recv operation. [0, 32767). 0 = INFINITE.
Returns:
1 if a connection was made, otherwise 0.

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines