UCommon
Public Member Functions
ucommon::TCPServer Class Reference

A generic tcp server class. More...

#include <socket.h>

Inheritance diagram for ucommon::TCPServer:
Inheritance graph
[legend]
Collaboration diagram for ucommon::TCPServer:
Collaboration graph
[legend]

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=0, 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=0, int type=0, int protocol=0)
 Create a listen socket directly.

Detailed Description

A generic tcp server class.

This saves the service id tag so that it can be propagated.

Author:
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 1729 of file socket.h.


Constructor & Destructor Documentation

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.

Parameters:
servicetag to use.
addressof interface to bind or "*" for all.
backlogsize for pending connections.

The documentation for this class was generated from the following file: