TCPServerSocket Class Reference

#include <PracticalSocket.h>

Inheritance diagram for TCPServerSocket:

Socket List of all members.

Public Member Functions

 TCPServerSocket (unsigned short localPort, int queueLen=5) throw (SocketException)
 TCPServerSocket (const string &localAddress, unsigned short localPort, int queueLen=5) throw (SocketException)
TCPSocketaccept () throw (SocketException)

Private Member Functions

void setListen (int queueLen) throw (SocketException)

Detailed Description

TCP socket class for servers


Constructor & Destructor Documentation

TCPServerSocket::TCPServerSocket ( unsigned short  localPort,
int  queueLen = 5 
) throw (SocketException)

Construct a TCP socket for use with a server, accepting connections on the specified port on any interface

Parameters:
localPort local port of server socket, a value of zero will give a system-assigned unused port
queueLen maximum queue length for outstanding connection requests (default 5)
Exceptions:
SocketException thrown if unable to create TCP server socket

TCPServerSocket::TCPServerSocket ( const string &  localAddress,
unsigned short  localPort,
int  queueLen = 5 
) throw (SocketException)

Construct a TCP socket for use with a server, accepting connections on the specified port on the interface specified by the given address

Parameters:
localAddress local interface (address) of server socket
localPort local port of server socket
queueLen maximum queue length for outstanding connection requests (default 5)
Exceptions:
SocketException thrown if unable to create TCP server socket


Member Function Documentation

TCPSocket * TCPServerSocket::accept (  )  throw (SocketException)

Blocks until a new connection is established on this socket or error

Returns:
new connection socket
Exceptions:
SocketException thrown if attempt to accept a new connection fails

void TCPServerSocket::setListen ( int  queueLen  )  throw (SocketException) [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 27 14:11:51 2007 for anytun by  doxygen 1.5.1