NewNet::TcpServerSocket Class Reference

Implements a TCP/IP server class. More...

#include <nntcpserversocket.h>

Inheritance diagram for NewNet::TcpServerSocket:

NewNet::ServerSocket NewNet::Socket NewNet::Object List of all members.

Public Member Functions

 TcpServerSocket ()
 Create a TCP/IP server socket.
void listen (const std::string &host, unsigned int port)
 Listen on a port on the specified host.
void listen (unsigned int port)
 Listen on a port of any active network adapter. */.

Detailed Description

Implements a TCP/IP server class that can listen for incoming connections on a specified host and port.

Definition at line 30 of file nntcpserversocket.h.


Constructor & Destructor Documentation

NewNet::TcpServerSocket::TcpServerSocket (  )  [inline]

Creates a TCP/IP server socket. The socket isn't yet bound to anything, so call listen() to activate the server socket.

Definition at line 36 of file nntcpserversocket.h.


Member Function Documentation

void NewNet::TcpServerSocket::listen ( const std::string &  host,
unsigned int  port 
)

Starts listening on a port on the specified host.

Definition at line 27 of file nntcpserversocket.cpp.

References NewNet::ServerSocket::cannotListenEvent, NewNet::Socket::ErrorCannotBind, NewNet::Socket::ErrorCannotListen, NewNet::Socket::ErrorCannotResolve, NewNet::ServerSocket::listeningEvent, NewNet::Socket::setDescriptor(), NewNet::Socket::setSocketError(), NewNet::Socket::setSocketState(), and NewNet::Socket::SocketListening.

Referenced by listen().

void NewNet::TcpServerSocket::listen ( unsigned int  port  )  [inline]

Starts listening on the specified port of all active network adapters.

Definition at line 47 of file nntcpserversocket.h.

References listen().


The documentation for this class was generated from the following files:
Generated on Sun Jan 7 14:00:02 2007 for NewNet by  doxygen 1.5.1