connection_waiter Class Reference

#include <unix_buffer.H>

Inheritance diagram for connection_waiter:

Inheritance graph
[legend]
Collaboration diagram for connection_waiter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 connection_waiter (const int server_port, int server_port_tries=10, const int _client_default_timeout=75)
 ~connection_waiter ()
 closes the server socket
int get_new_client_socket_descriptor () const
int get_client_default_timeout () const

Protected Member Functions

virtual int _get_descriptor () const

Protected Attributes

int server_socket
const int client_default_timeout


Detailed Description

opens a server socket on a given port on construction, returns incoming client connections on request, and shuts down the server socket on destruction.

Definition at line 670 of file unix_buffer.H.


Constructor & Destructor Documentation

connection_waiter::connection_waiter ( const int  server_port,
int  server_port_tries = 10,
const int  _client_default_timeout = 75 
) [inline, explicit]

tries to open the given server port for incoming client connections

Parameters:
server_port server port to listen for new connections
server_port_tries (optional) number of tries to establish the server socket before giving up
_client_default_timeout (optional) default timeout in seconds for client connections (to automate/ease unix_buffer initializations)

Definition at line 686 of file unix_buffer.H.

connection_waiter::~connection_waiter (  )  [inline]

closes the server socket

Definition at line 699 of file unix_buffer.H.


Member Function Documentation

virtual int connection_waiter::_get_descriptor (  )  const [inline, protected, virtual]

Implements Cprovide_descriptor_access.

Definition at line 676 of file unix_buffer.H.

References server_socket.

int connection_waiter::get_new_client_socket_descriptor (  )  const [inline]

waits for a new client connection an returns a socket descriptor

Returns:
socket descriptor for a new client connection

Definition at line 709 of file unix_buffer.H.

Referenced by main(), and CXML_StatusServer::THREAD_XML_StatusServer().

int connection_waiter::get_client_default_timeout (  )  const [inline]

Returns:
default timeout in seconds for client connections

Definition at line 724 of file unix_buffer.H.


Member Data Documentation

int connection_waiter::server_socket [protected]

Definition at line 673 of file unix_buffer.H.

Referenced by _get_descriptor().

const int connection_waiter::client_default_timeout [protected]

Definition at line 674 of file unix_buffer.H.


The documentation for this class was generated from the following file:
Generated on Wed Nov 7 23:30:59 2007 for Qsieve by  doxygen 1.5.4