#include <socket.h>


Public Member Functions | |
| ListenSocket (char *address, char *service, unsigned backlog=5, int protocol=0) | |
| Create and bind a listener socket. | |
| socket_t | accept (struct sockaddr_storage *address=((void *) 0)) |
| Accept a socket connection. | |
| bool | waitConnection (timeout_t timeout=Timer::inf) |
| Wait for a pending connection. | |
| operator socket_t () | |
| Get the socket descriptor of the listener. | |
| socket_t | operator* () |
| Get the socket descriptor of the listener by pointer reference. | |
This class is commonly used for TCP and DCCP listener sockets.
Definition at line 1503 of file socket.h.
| ucc::ListenSocket::ListenSocket | ( | char * | address, | |
| char * | service, | |||
| unsigned | backlog = 5, |
|||
| int | protocol = 0 | |||
| ) |
Create and bind a listener socket.
| address | to bind on or "*" for all. | |
| service | port to bind listener. | |
| backlog | size for buffering pending connections. | |
| protocol | for socket if not TCPIP. |
| socket_t ucc::ListenSocket::accept | ( | struct sockaddr_storage * | address = ((void *) 0) |
) |
Accept a socket connection.
| address | to save peer connecting. |
| ucc::ListenSocket::operator socket_t | ( | ) | [inline] |
Get the socket descriptor of the listener.
Reimplemented from ucc::Socket.
| socket_t ucc::ListenSocket::operator* | ( | ) | [inline] |
Get the socket descriptor of the listener by pointer reference.
Reimplemented from ucc::Socket.
| bool ucc::ListenSocket::waitConnection | ( | timeout_t | timeout = Timer::inf |
) | [inline] |
1.5.9