#include <PracticalSocket.h>
Inheritance diagram for TCPServerSocket:
Public Member Functions | |
TCPServerSocket (unsigned short localPort, int queueLen=5) throw (SocketException) | |
TCPServerSocket (const string &localAddress, unsigned short localPort, int queueLen=5) throw (SocketException) | |
TCPSocket * | accept () throw (SocketException) |
Private Member Functions | |
void | setListen (int queueLen) throw (SocketException) |
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
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) |
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
localAddress | local interface (address) of server socket | |
localPort | local port of server socket | |
queueLen | maximum queue length for outstanding connection requests (default 5) |
SocketException | thrown if unable to create TCP server socket |
TCPSocket * TCPServerSocket::accept | ( | ) | throw (SocketException) |
Blocks until a new connection is established on this socket or error
SocketException | thrown if attempt to accept a new connection fails |
void TCPServerSocket::setListen | ( | int | queueLen | ) | throw (SocketException) [private] |