Public Member Functions | Friends

CxUtils::TcpServer Class Reference

Socket created by TcpListenSocket which maintains a connection to a TCP client. Capable of sending/receiving packet data from/to client. More...

#include <tcpserver.h>

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

List of all members.

Public Member Functions

 TcpServer ()
 Constructor.
virtual ~TcpServer ()
 Destructor, shuts down socket.
int InitializeSocket (const TcpListenSocket &socket)
 This function waits/listens for a client to make a connection to the server socket using a listen socket.
IP4Address GetClientAddress () const

Friends

class TcpListenSocket

Detailed Description

Socket created by TcpListenSocket which maintains a connection to a TCP client. Capable of sending/receiving packet data from/to client.

TCP Connections are bi-directional (you can send and receive on the socket).

Definition at line 59 of file tcpserver.h.


Constructor & Destructor Documentation

TcpServer::TcpServer (  )

Constructor.

Definition at line 54 of file tcpserver.cpp.

TcpServer::~TcpServer (  ) [virtual]

Destructor, shuts down socket.

Definition at line 64 of file tcpserver.cpp.


Member Function Documentation

IP4Address CxUtils::TcpServer::GetClientAddress (  ) const [inline]

Definition at line 66 of file tcpserver.h.

int TcpServer::InitializeSocket ( const TcpListenSocket socket )

This function waits/listens for a client to make a connection to the server socket using a listen socket.

If the listen socket was created as blocking, this function will block. Otherwise it will wait as long as the maximum receive timeout.

Parameters:
socketThe socket to listen on.
Returns:
1 if the socket was connected to a client, otherwise 0 (failure).

Definition at line 83 of file tcpserver.cpp.


Friends And Related Function Documentation

friend class TcpListenSocket [friend]

Definition at line 61 of file tcpserver.h.


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