ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR > Class Template Reference

Connector is a template class for initialization of communication services. More...

#include <Connector.h>

Inheritance diagram for ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >:

Inheritance graph
[legend]
Collaboration diagram for ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Connector ()
 Constructor. Do-nothing.
virtual ~Connector ()
 Destructor. Do-nothing.
virtual int open (const TimeVal &tv_=TimeVal(5.0), ConnectMode mode_=sync, Reactor *r_=(Reactor *) NULL)
 Configure Connector.
virtual int close (void)
 Do-nothing close.
virtual int connect (SERVICE_HANDLER *sh_, Address &addr_, int protocol_=AF_INET)
 Define strategy for establishing connection.
virtual int handle_write (int fd)
 Handle connection completion.
virtual int handle_timeout (TimerId tid)
 Handler connection timeout.

Protected Types

enum  ProgressState { idle, waiting, conned, failed }
 state. More...

Protected Member Functions

virtual SERVICE_HANDLER * makeServiceHandler (SERVICE_HANDLER *sh_)
 Defines creation strategy for ServiceHandler.
virtual int connectServiceHandler (Address &addr, int protocol)
 Default strategy is to make synchronous connection with no timeouts.
virtual int activateServiceHandler ()
 Activate handler by calling its open() method.

Protected Attributes

TimeVal m_timeout
 Timeout.
TimerId m_tid
 Timer id.
Reactorm_reactor
 Reference to Reactor (for async).
ProgressState m_state
 Connection progress state.
int m_flags
 Socket flags (obsolete).
SERVICE_HANDLER * m_sh
 Reference to ServiceHandler.
int m_fd
 Socket file descriptor.
ConnectMode m_mode
 Mode (sync/async).

Private Member Functions

void doAsync (void)
 Setup for asynchronous mode completion.
int doSync (void)
 Synchronous mode completion.

Detailed Description

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
class ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >

Connector is a template class for initialization of communication services.

This template class implements the generic strategy for actively
initializing communication services.

SERVICE_HANDLER is the type of service. It shall be a type derived from ServiceHandler interface class.

PEER_CONNECTOR is the type of concrete Socket class - particular transport mechanism used by the Connector to actively establish the connection. It should be derived from Socket interface class.

Definition at line 63 of file Connector.h.


Member Enumeration Documentation

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
enum ASSA::Connector::ProgressState [protected]
 

state.

Connection state.

Enumerator:
idle  Initialized.
waiting  Asynchronously waiting on connection completion.
conned  Connected.
failed  Failed to connect.

Definition at line 131 of file Connector.h.

00131                        { 
00132         idle,       
00133         waiting,    
00134         conned,     
00135         failed      
00136     };


Constructor & Destructor Documentation

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::Connector  ) 
 

Constructor. Do-nothing.

Definition at line 205 of file Connector.h.

References ASSA::EventHandler::set_id(), ASSA::SOCKTRACE, and trace_with_mask.

00206     : m_tid (0), m_reactor (0), m_state (idle),
00207       m_flags (0), m_sh ((SERVICE_HANDLER*)NULL), m_fd (-1), m_mode (sync)
00208 {
00209     trace_with_mask("Connector::Connector",SOCKTRACE);
00210     set_id ("Connector");
00211 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::~Connector  )  [virtual]
 

Destructor. Do-nothing.

Definition at line 215 of file Connector.h.

References ASSA::SOCKTRACE, and trace_with_mask.

00216 {
00217     trace_with_mask("Connector::~Connector",SOCKTRACE);
00218     // If I created SERVICE_HANDLER, should I delete it too?
00219 }


Member Function Documentation

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::activateServiceHandler  )  [protected, virtual]
 

Activate handler by calling its open() method.

Returns:
0 on success, -1 on error.

Definition at line 323 of file Connector.h.

References ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_sh, ASSA::SOCKTRACE, and trace_with_mask.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write().

00324 {
00325     trace_with_mask("Connector::activateServiceHandler",SOCKTRACE);
00326 
00327     return m_sh->open ();
00328 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::close void   )  [virtual]
 

Do-nothing close.

Derive classes can change this strategy by overloading this method.

Returns:
0 on success, -1 on error.

Definition at line 237 of file Connector.h.

References ASSA::SOCKTRACE, and trace_with_mask.

00238 {
00239     trace_with_mask("Connector::close",SOCKTRACE);
00240     return 0;
00241 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::connect SERVICE_HANDLER *  sh_,
Address addr_,
int  protocol_ = AF_INET
[virtual]
 

Define strategy for establishing connection.

Default is to connect synchronously to the remote peer. In sync mode connection either will be established or failed when returned from Connector::connect() call.

In async mode, call to Connector::connect() returns immediately reporting only immediate error. Later on connection is completed asynchronously.

Default timeout on connection waiting is 10 seconds. Timeout can be configured by passing TimeVal parameter to the Connector::open() member function.

If connetion failed, caller should definitely close PEER_CONNECTOR communication point.

Parameters:
sh_ Pointer to class object derived from ServiceHandler.
addr_ Reference to the address to connect to.
protocol_ AF_INET for internet socket, AF_UNIX for the UNIX Domain socket (defaults to AF_INET).
Returns:
0 on success, -1 on error.

Definition at line 245 of file Connector.h.

References ASSA::ASSAERR, ASSA::Address::bad(), EL, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_sh, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::makeServiceHandler(), ASSA::set_errno(), ASSA::SOCKTRACE, and trace_with_mask.

Referenced by ASSA::Logger::log_open().

00246 {
00247     /*
00248      * We restore socket to its original mode only on 
00249      * successful connection. If error occured, client would have
00250      * to close socket anyway.
00251      *
00252      * NOTE: If sh_==0, then result is dangling pointer
00253      * new_sh produced ! Destructor should determine whether 
00254      * SERVICE_HANDLER has been created dynamically and if so, delete
00255      * it.
00256      */
00257     trace_with_mask("Connector::connect",SOCKTRACE);
00258     errno = 0;
00259 
00260     m_sh = makeServiceHandler (sh_);
00261     PEER_CONNECTOR& s = *m_sh;
00262 
00263     if (addr_.bad ()) {
00264         set_errno (EFAULT); // Bad address
00265         EL((ASSA::ASSAERR,"Bad address (errno %d)\n", errno));
00266         return -1;
00267     }
00268 
00269     if (connectServiceHandler (addr_, protocol_family_) == -1) 
00270     {
00271         int e = get_errno ();
00272         if (e == EINPROGRESS || e == EWOULDBLOCK) 
00273         {
00274             if (async == m_mode) { 
00275                 doAsync (); 
00276                 return 0; 
00277             }
00278 
00279             return doSync ();
00280         }
00281         return -1;
00282     }
00283 
00284     return activateServiceHandler ();
00285 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::connectServiceHandler Address addr,
int  protocol
[protected, virtual]
 

Default strategy is to make synchronous connection with no timeouts.

Derived class can change this strategy by overloading this method.

Returns:
0 on success, -1 on error.

Definition at line 303 of file Connector.h.

References ASSA::ASSAERR, EL, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_sh, ASSA::SOCKTRACE, and trace_with_mask.

00304 {
00305     trace_with_mask("Connector::connectServiceHandler",SOCKTRACE);
00306 
00307     PEER_CONNECTOR& s = *m_sh;
00308     
00309     if ( !s.open (protocol_family_) ) {
00310         EL((ASSA::ASSAERR,"Socket::open (protocol=%d) failed\n",
00311             protocol_family_));
00312         return -1;
00313     }
00314     
00315     m_fd = s.getHandler ();
00316     s.setOption (ASSA::Socket::nonblocking, 1);
00317 
00318     return (s.connect (addr_) ? 0 : -1);
00319 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
void ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doAsync void   )  [private]
 

Setup for asynchronous mode completion.

Definition at line 332 of file Connector.h.

References ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_fd, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_reactor, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_state, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_tid, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_timeout, ASSA::Reactor::registerIOHandler(), ASSA::Reactor::registerTimerHandler(), ASSA::SOCKTRACE, trace_with_mask, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::waiting, and ASSA::WRITE_EVENT.

00333 {
00334     trace_with_mask("Connector::doAsync",SOCKTRACE);
00335 
00336     /* We are doing async and 3-way handshake is in
00337      * progress - hook up with Reactor and wait on timer.
00338      * Write event will be our indicator whether connection
00339      * was completed or not.
00340      */
00341     m_reactor->registerIOHandler (this, m_fd, WRITE_EVENT);
00342 
00343     m_tid = m_reactor->registerTimerHandler (this, m_timeout, "ASYNC Connect");
00344     m_state = waiting;
00345 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doSync void   )  [private]
 

Synchronous mode completion.

Returns:
0 on success; -1 if error.

Definition at line 349 of file Connector.h.

References ASSA::ASSAERR, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::conned, DL, EL, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_fd, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_reactor, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_state, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_timeout, ASSA::Reactor::registerIOHandler(), ASSA::Reactor::registerTimerHandler(), ASSA::Reactor::removeHandler(), ASSA::set_errno(), ASSA::SOCKTRACE, trace_with_mask, ASSA::Reactor::waitForEvents(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::waiting, and ASSA::WRITE_EVENT.

00350 {
00351     trace_with_mask("Connector::doSync",SOCKTRACE);
00352 
00353     m_reactor = new Reactor;
00354 
00355     m_reactor->registerIOHandler    (this, m_fd, WRITE_EVENT);
00356     m_reactor->registerTimerHandler (this, m_timeout, "SYNC Connect");
00357     m_state = waiting;
00358     m_reactor->waitForEvents (&m_timeout); // Let the ball rolling ...
00359     m_reactor->removeHandler (this);    // Remove all handlers.
00360 
00361     delete m_reactor;
00362     m_reactor = 0;
00363 
00364     if (conned == m_state) 
00365     {
00366         DL((SOCKTRACE,"Synchronous connect() succeeded.\n"));
00367         return 0;
00368     }
00369 
00370     EL((ASSA::ASSAERR,"Synchronous connect() timed out.\n"));
00371     set_errno (ETIMEDOUT);
00372 
00373     return -1;
00374 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_timeout TimerId  tid  )  [virtual]
 

Handler connection timeout.

Reimplemented from ASSA::EventHandler.

Definition at line 474 of file Connector.h.

References ASSA::async, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::failed, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_mode, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_reactor, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_state, ASSA::Reactor::removeHandler(), ASSA::set_errno(), ASSA::SOCKTRACE, trace_with_mask, and ASSA::WRITE_EVENT.

00475 {
00476     trace_with_mask("Connector::handle_timeout",SOCKTRACE);
00477 
00478     m_state = failed;
00479     set_errno (ETIMEDOUT);  // Connection timed out
00480 
00481     if (async == m_mode) {
00482         m_reactor->removeHandler (this, WRITE_EVENT);
00483     }
00484     return -1;      // Remove Timer Handler
00485 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write int  fd_  )  [virtual]
 

Handle connection completion.

Always remove IO handler first.

Reimplemented from ASSA::EventHandler.

Definition at line 378 of file Connector.h.

References ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::activateServiceHandler(), ASSA::ASSAERR, ASSA::async, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::conned, DL, EL, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::failed, ASSA::get_errno(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_fd, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_mode, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_reactor, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_sh, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_state, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_tid, ASSA::Reactor::removeHandler(), ASSA::Reactor::removeTimerHandler(), ASSA::set_errno(), ASSA::SOCKTRACE, trace_with_mask, and ASSA::WRITE_EVENT.

00379 {
00380     trace_with_mask("Connector::handle_write",SOCKTRACE);
00381 
00382     /* Precondition 
00383      */
00384     if (fd_ != m_fd) {
00385         return -1;
00386     }
00387 
00388     /* This method serves both sync and async modes - thus the
00389      * differences. For async we remove Timer here. sync runs
00390      * its own private Reactor and handler termination is 
00391      * handled in doSync().
00392      */
00393 
00394     if (async == m_mode) { // Complete SH activation
00395         m_reactor->removeTimerHandler (m_tid);
00396         m_tid = 0;
00397     }
00398 
00399     /*
00400      * Although SUN and Linux man pages on connect(3) claims that
00401      * "upon asynchronous establishement of connection, select(3)
00402      * will indicate that the file descriptor for the socket is ready
00403      * for writing", as discussed in W.S.Stevens "UNIX network
00404      * programming", Vol I, 2nd edition, BSD-derived systems also
00405      * mark file descriptor both readable and writable when the
00406      * connection establishment encouters an error.
00407      *
00408      * Therefore we need an extra step to find out what really happened.
00409      * One way to do so is to look at socket pending errors...
00410      */
00411 
00412     int error;
00413     int ret;
00414     error = ret = errno = 0;
00415     socklen_t n = sizeof (error);
00416 
00419     m_reactor->removeHandler (this, WRITE_EVENT);   
00420 
00421 #if defined(__CYGWIN32__) 
00422     ret = getsockopt (m_fd, SOL_SOCKET, SO_ERROR, (void*)&error, (int*)&n);
00423 #elif defined (WIN32)
00424     ret = getsockopt (m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, (int*)&n);
00425 #else
00426     ret = getsockopt (m_fd, SOL_SOCKET, SO_ERROR, (void*)&error, &n);
00427 #endif
00428 
00429     if (ret == 0) {
00430         if (error == 0) 
00431         {
00432             if (activateServiceHandler () == 0) {
00433                 DL((SOCKTRACE,"Nonblocking connect() completed\n"));
00434                 m_state = conned;
00435             }
00436             else {
00437                 DL((SOCKTRACE,"Nonblocking connect() failed\n"));
00438                 m_state = failed;
00439             }
00440             return (0);         // return value doesn't really matter
00441         }
00442         /* Socket pending error - propagate it via errno. */
00443 
00444         EL((ASSA::ASSAERR,"Socket pending error: %d\n",error));
00445         set_errno (error);
00446     }
00447     else {  /* Solaris pending error. */
00448         EL((ASSA::ASSAERR,"getsockopt(3) = %d\n", ret));
00449         EL((ASSA::ASSAERR,"Solaris pending error!\n"));
00450     }
00451     m_state = failed;
00452 
00453     EL((ASSA::ASSAERR,"Nonblocking connect (2) failed\n"));
00454 
00455     if (get_errno () == ECONNREFUSED) 
00456     {
00457         EL((ASSA::ASSAERR,"Try to compare port "
00458              "numbers on client and service hosts.\n"));
00459     }
00460         /* This is the only way to tell SH that we failed to connect. 
00461      */
00462     if (async == m_mode) {
00463         m_sh->close (); 
00464     }
00465 
00466     /* Don't alter fd mask - SERVICE_HANDLER::open() could have changed 
00467      * it already for application processing needs.
00468      */
00469     return 0;
00470 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
SERVICE_HANDLER * ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::makeServiceHandler SERVICE_HANDLER *  sh_  )  [protected, virtual]
 

Defines creation strategy for ServiceHandler.

Default is to dynamically allocate new SERVICE_HANDLER, if one is not given as an argument.

Parameters:
sh_ pointer to SERVICE_HANDLER, or NULL, if it is expected to be created here
Returns:
pointer to SERVICE_HANDLER

Definition at line 289 of file Connector.h.

References ASSA::SOCKTRACE, and trace_with_mask.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::connect().

00290 {
00291     trace_with_mask("Connector::makeServiceHandler",SOCKTRACE);
00292 
00293     SERVICE_HANDLER* new_sh = sh_;
00294 
00295     if (sh_ == 0) {
00296         new_sh = new SERVICE_HANDLER;
00297     }
00298     return new_sh;
00299 }

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::open const TimeVal tv_ = TimeVal(5.0),
ConnectMode  mode_ = sync,
Reactor r_ = (Reactor *) NULL
[virtual]
 

Configure Connector.

Timeout will be used to timeout connection operation. If mode_ is async, then Reactor r_ ought to be specified for handling asynchronous event processing. Derive classes can change this strategy by overloading this method.

Parameters:
tv_ Time for connection timeout (Default = 5.0 secs.)
mode_ Synchronous or Asynchronous mode.
r_ Reactor to work with (for async mode).
Returns:
0 on success, -1 on error.

Definition at line 223 of file Connector.h.

References ASSA::async, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_mode, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_reactor, ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_timeout, ASSA::SOCKTRACE, and trace_with_mask.

Referenced by ASSA::Logger::log_open().

00224 {
00225     trace_with_mask("Connector::open", SOCKTRACE);
00226 
00227     m_timeout = tv_;
00228     if (async == mode_ && (Reactor*) NULL == r_) 
00229         return -1;
00230     m_mode = mode_;
00231     m_reactor = r_;
00232     return 0;
00233 }


Member Data Documentation

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_fd [protected]
 

Socket file descriptor.

Definition at line 179 of file Connector.h.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doAsync(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doSync(), and ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write().

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
int ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_flags [protected]
 

Socket flags (obsolete).

Definition at line 173 of file Connector.h.

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
ConnectMode ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_mode [protected]
 

Mode (sync/async).

Definition at line 182 of file Connector.h.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_timeout(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write(), and ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::open().

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
Reactor* ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_reactor [protected]
 

Reference to Reactor (for async).

Definition at line 167 of file Connector.h.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doAsync(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doSync(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_timeout(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write(), and ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::open().

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
SERVICE_HANDLER* ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_sh [protected]
 

Reference to ServiceHandler.

Definition at line 176 of file Connector.h.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::activateServiceHandler(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::connect(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::connectServiceHandler(), and ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write().

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
ProgressState ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_state [protected]
 

Connection progress state.

Definition at line 170 of file Connector.h.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doAsync(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doSync(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_timeout(), and ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write().

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
TimerId ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_tid [protected]
 

Timer id.

Definition at line 164 of file Connector.h.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doAsync(), and ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::handle_write().

template<class SERVICE_HANDLER, class PEER_CONNECTOR>
TimeVal ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::m_timeout [protected]
 

Timeout.

Definition at line 161 of file Connector.h.

Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doAsync(), ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::doSync(), and ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::open().


The documentation for this class was generated from the following file:
Generated on Sun Aug 13 15:08:19 2006 for libassa by  doxygen 1.4.6