TCPServerSocket Class Reference
#include <PracticalSocket.h>
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) |
| TCPSocket * | accept () 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:
-
| 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:
-
Member Function Documentation
Blocks until a new connection is established on this socket or error
- Returns:
- new connection socket
- Exceptions:
-
References Socket::sockDesc.
| void TCPServerSocket::setListen |
( |
int |
queueLen |
) |
throw (SocketException) [private] |
The documentation for this class was generated from the following files: