A bound socket used to listen for inbound socket connections. More...
#include <socket.h>


Public Member Functions | |
| socket_t | accept (struct sockaddr_storage *address=NULL) |
| Accept a socket connection. | |
| socket_t | getsocket (void) const |
| Get the socket descriptor of the listener. | |
| ListenSocket (const char *address, const char *service, unsigned backlog=5, int protocol=0) | |
| Create and bind a listener socket. | |
| operator socket_t () const | |
| Get the socket descriptor of the listener. | |
| socket_t | operator* () const |
| Get the socket descriptor of the listener by pointer reference. | |
| bool | waitConnection (timeout_t timeout=Timer::inf) const |
| Wait for a pending connection. | |
A bound socket used to listen for inbound socket connections.
This class is commonly used for TCP and DCCP listener sockets.
Definition at line 1669 of file socket.h.
| ucc::ListenSocket::ListenSocket | ( | const char * | address, | |
| const 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 = NULL |
) |
Accept a socket connection.
| address | to save peer connecting. |
| socket_t ucc::ListenSocket::getsocket | ( | void | ) | const [inline] |
| ucc::ListenSocket::operator socket_t | ( | ) | const [inline] |
Get the socket descriptor of the listener.
Reimplemented from ucc::Socket.
| socket_t ucc::ListenSocket::operator* | ( | ) | const [inline] |
Get the socket descriptor of the listener by pointer reference.
Reimplemented from ucc::Socket.
| bool ucc::ListenSocket::waitConnection | ( | timeout_t | timeout = Timer::inf |
) | const [inline] |
1.6.3