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

SocketAgent Class Reference

The connection agent. More...

Inheritance diagram for SocketAgent:

GSISocketAgent List of all members.

Public Member Functions

virtual bool Send (const std::string &)
 Send a string value.

virtual bool Send (int)
 Send a int value.

virtual bool Send (long)
 Send a long value.

virtual bool Receive (int &)
 Receive an int value.

virtual bool Receive (long &)
 Receive a long value.

virtual bool Receive (std::string &)
 Receive a string value.

std::string HostName ()
 Returns the host name.

bool SetTimeout (size_t)
 Set the connection timeout.

bool SetRcvTimeout (size_t)
 Set the connection timeout.

bool SetSndTimeout (size_t)
 Set the connection timeout.

int SocketDescriptor ()
 Returns the host name.


Protected Member Functions

 SocketAgent ()
 Constructor.

virtual ~SocketAgent ()
 Destructor.


Protected Attributes

int sck
 The socket descriptor.


Friends

class SocketServer
 The Server.

class SocketClient
 The Client.


Detailed Description

The connection agent.

This object acts as agent in message exchange. It joins the server and the client in both connection establishment and message exchange.

Author:
Salvatore Monforte

comments by Marco Pappalardo and Salvatore Monforte


Constructor & Destructor Documentation

SocketAgent  )  [protected]
 

Constructor.

virtual ~SocketAgent  )  [protected, virtual]
 

Destructor.


Member Function Documentation

std::string HostName  ) 
 

Returns the host name.

Parameters:
the string to fill with host name.

virtual bool Receive std::string &   )  [virtual]
 

Receive a string value.

Parameters:
s the string to fill.
Returns:
true on success, false otherwise.

Reimplemented in GSISocketAgent.

virtual bool Receive long &   )  [virtual]
 

Receive a long value.

Parameters:
i a long to fill.
Returns:
true on success, false otherwise.

virtual bool Receive int &   )  [virtual]
 

Receive an int value.

Parameters:
i an int to fill.
Returns:
true on success, false otherwise.

Reimplemented in GSISocketAgent.

virtual bool Send long   )  [virtual]
 

Send a long value.

Parameters:
i the long value to send.
Returns:
true on success, false otherwise.

virtual bool Send int   )  [virtual]
 

Send a int value.

Parameters:
i the int value to send.
Returns:
true on success, false otherwise.

Reimplemented in GSISocketAgent.

virtual bool Send const std::string &   )  [virtual]
 

Send a string value.

Parameters:
s the string value to send.
Returns:
true on success, false otherwise.

Reimplemented in GSISocketAgent.

bool SetRcvTimeout size_t   ) 
 

Set the connection timeout.

Parameters:
secs a size_t representing the timeout in seconds while receiving data.
Returns:
tru on success, false otherwise.

bool SetSndTimeout size_t   ) 
 

Set the connection timeout.

Parameters:
secs a size_t representing the timeout in seconds while sending data.
Returns:
tru on success, false otherwise.

bool SetTimeout size_t   ) 
 

Set the connection timeout.

Parameters:
secs a size_t representing the timeout in seconds.
Returns:
tru on success, false otherwise.

int SocketDescriptor  )  [inline]
 

Returns the host name.

Parameters:
the string to fill with host name.


Friends And Related Function Documentation

friend class SocketClient [friend]
 

The Client.

friend class SocketServer [friend]
 

The Server.


Member Data Documentation

int sck [protected]
 

The socket descriptor.


The documentation for this class was generated from the following file:
Generated on Wed Mar 1 00:37:57 2006 for COMMON API - configuration, jobid, ldif2classadi, logger, process, requestad, socket++i, task, utilities by doxygen 1.3.5