#include <socket.h>
Inheritance diagram for ucommon::ListenSocket:


Public Member Functions | |
| socket_t | accept (struct sockaddr_storage *address=((void *) 0)) |
| Accept a socket connection. | |
| socket_t | getsocket (void) |
| Get the socket descriptor of the listener. | |
| socket_t | handle (void) |
| ListenSocket (char *address, char *service, unsigned backlog=5, int family=0, int type=0, int protocol=0) | |
| Create and bind a listener socket. | |
| socket_t | operator * () |
| Get the socket descriptor of the listener by pointer reference. | |
| operator socket_t () | |
| Get the socket descriptor of the listener. | |
| bool | wait (timeout_t timeout=Timer::inf) |
| Wait for a pending connection. | |
Static Public Member Functions | |
| static socket_t | create (char *address, char *service, unsigned backlog=5, int family=0, int type=0, int protocol=0) |
| Create a listen socket directly. | |
This class is commonly used for TCP and DCCP listener sockets.
Definition at line 1573 of file socket.h.
| ucommon::ListenSocket::ListenSocket | ( | char * | address, | |
| char * | service, | |||
| unsigned | backlog = 5, |
|||
| int | family = 0, |
|||
| int | type = 0, |
|||
| 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. | |
| family | of socket. | |
| type | of socket. | |
| protocol | for socket if not TCPIP. |
| socket_t ucommon::ListenSocket::accept | ( | struct sockaddr_storage * | address = ((void *) 0) |
) |
Accept a socket connection.
| address | to save peer connecting. |
| static socket_t ucommon::ListenSocket::create | ( | char * | address, | |
| char * | service, | |||
| unsigned | backlog = 5, |
|||
| int | family = 0, |
|||
| int | type = 0, |
|||
| int | protocol = 0 | |||
| ) | [static] |
Create a listen socket directly.
| address | to bind on or "*" for all. | |
| service | port to bind listener. | |
| backlog | size for buffering pending connections. | |
| family | of socket. | |
| type | of socket. | |
| protocol | for socket if not TCPIP. |
| socket_t ucommon::ListenSocket::getsocket | ( | void | ) | [inline] |
| socket_t ucommon::ListenSocket::operator * | ( | ) | [inline] |
Get the socket descriptor of the listener by pointer reference.
Reimplemented from ucommon::Socket.
| ucommon::ListenSocket::operator socket_t | ( | ) | [inline] |
Get the socket descriptor of the listener.
Reimplemented from ucommon::Socket.
| bool ucommon::ListenSocket::wait | ( | timeout_t | timeout = Timer::inf |
) | [inline] |
Wait for a pending connection.
| timeout | to wait. |
Reimplemented from ucommon::Socket.
Definition at line 1611 of file socket.h.
References ucommon::wait().
Here is the call graph for this function:

1.4.7