|
UCommon
|
A generic tcp server class. More...
#include <socket.h>


Public Member Functions | |
| TCPServer (char *address, char *service, unsigned backlog=5) | |
| Create and bind a tcp server. | |
Public Member Functions inherited from ucommon::ListenSocket | |
| socket_t | accept (struct sockaddr_storage *address=((void *) 0)) |
| Accept a socket connection. | |
| socket_t | getsocket (void) |
| Get the socket descriptor of the listener. | |
| ListenSocket (char *address, char *service, unsigned backlog=5, int family=AF_UNSPEC, int type=0, int protocol=0) | |
| Create and bind a listener socket. | |
| operator socket_t () | |
| Get the socket descriptor of the listener. | |
| socket_t | operator* () |
| Get the socket descriptor of the listener by pointer reference. | |
| bool | waitConnection (timeout_t timeout=Timer::inf) |
| Wait for a pending connection. | |
Additional Inherited Members | |
Static Public Member Functions inherited from ucommon::ListenSocket | |
| static socket_t | create (char *address, char *service, unsigned backlog=5, int family=AF_UNSPEC, int type=0, int protocol=0) |
| Create a listen socket directly. | |
A generic tcp server class.
This saves the service id tag so that it can be propagated.
| ucommon::TCPServer::TCPServer | ( | char * | address, |
| char * | service, | ||
| unsigned | backlog = 5 |
||
| ) |
Create and bind a tcp server.
This mostly is used to preserve the service tag for TCP Socket when derived from a server instance.
| service | tag to use. |
| address | of interface to bind or "*" for all. |
| backlog | size for pending connections. |
1.8.1.1