Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

edg::workload::common::socket_pp::SocketServer Class Reference

The connection Server. More...

Inheritance diagram for edg::workload::common::socket_pp::SocketServer:

edg::workload::common::socket_pp::GSISocketServer List of all members.

Public Methods

 SocketServer (int, int=5)
 Constructor. More...

virtual ~SocketServer ()
 Destructor. More...

bool Open ()
 Open the connection. More...

bool IsConnectionPending ()
 Return whether there is any pending connection. More...

virtual void Close ()
 Close the connection.

virtual SocketAgentListen (SocketAgent *=0)
 Listen for incoming connection requests. More...

void KillAgent (SocketAgent *)
 Kill a Socket Agent. More...


Protected Attributes

int sck
 The socket descriptor.


Detailed Description

The connection Server.

This object acts as Server in the message exchange. It listens for client connections and, when asked for, it receives, sets and sends back the reference to the agent to be used for message exchange.

Author:
Salvatore Monforte salvatore.monforte@ct.infn.it , comments by Marco Pappalardo marco.pappalardo@ct.infn.it and Salvatore Monforte


Constructor & Destructor Documentation

SocketServer int   ,
int    = 5
 

Constructor.

Parameters:
p  the server port.
b  the backlog, that is the maximum number of outstanding connection requests.

virtual ~SocketServer   [virtual]
 

Destructor.

This method must be also implemented by object subclassing server socket.


Member Function Documentation

bool IsConnectionPending  
 

Return whether there is any pending connection.

Returns:
true if any pending connection exista, false otherwise.

void KillAgent SocketAgent  
 

Kill a Socket Agent.

This also close the communication this agent holds.

Parameters:
a  the agent to kill.

virtual SocketAgent* Listen SocketAgent   = 0 [virtual]
 

Listen for incoming connection requests.

Accept incoming requests and redirect communication on a dedicated port.

Parameters:
a  a reference to the Socket Agent sent by Client.
Returns:
the Socket Agent redirecting communication on a dediceted port.

bool Open  
 

Open the connection.

Returns:
whether connection is established or not.


The documentation for this class was generated from the following file:
Generated on Fri May 14 14:18:27 2004 for COMMON API - configuration, jobid, ldif2classadi, logger, process, requestad, socket++i, task, utilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002