Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Examples  

SUEInetDuplexSession Class Reference

Duplex session based on AF_INET sockets. More...

#include <sue_inet.hpp>

Inheritance diagram for SUEInetDuplexSession:

Inheritance graph
[legend]
Collaboration diagram for SUEInetDuplexSession:

Collaboration graph
[legend]
List of all members.

Public Methods

 SUEInetDuplexSession (int a_timeout, const char *a_greeting=0)
virtual ~SUEInetDuplexSession ()
void Startup (SUEEventSelector *a_selector, int a_fd, const char *a_greeting=0)
 Start the session.

unsigned long GetLocalIp () const
 IP of the local endpoint.


Detailed Description

Duplex session based on AF_INET sockets.

This class is intended to incapsulate the functionality common for AF_INET sockets.

This particular verision adds to a generic duplex session object the capability of knowing the ip address of the local end of the connection.


Constructor & Destructor Documentation

SUEInetDuplexSession::SUEInetDuplexSession int    a_timeout,
const char *    a_greeting = 0
[inline]
 

virtual SUEInetDuplexSession::~SUEInetDuplexSession   [inline, virtual]
 


Member Function Documentation

unsigned long SUEInetDuplexSession::GetLocalIp   const [inline]
 

IP of the local endpoint.

The method returns the ip-address of the local endpoint of the connected socket (obtained with getsockname(2)). It is perfectly safe to request the address even when the session is already shot down because the address is always requested when the session starts up.

Note:
The address is returned in the HOST BYTE ORDER.

void SUEInetDuplexSession::Startup SUEEventSelector   a_selector,
int    a_fd,
const char *    a_greeting = 0
 

Start the session.

This method hides (incapsulates) the SUEGenericDuplexSession::Startup() method in order to do some specific manipulations.

In this particular version the only manipulation is to
get and store the ip address of the local end of the connection.

Reimplemented from SUEGenericDuplexSession.


The documentation for this class was generated from the following file:
Generated on Fri Feb 27 13:17:27 2004 for SUE Library by doxygen1.2.18