GNE::ConnectionEventGenerator Class Reference
[Internal Classes]

A class used internally by GNE to generate the events in Connection. More...

#include <ConnectionEventGenerator.h>

Inheritance diagram for GNE::ConnectionEventGenerator:

Inheritance graph
[legend]
Collaboration diagram for GNE::ConnectionEventGenerator:

Collaboration graph
[legend]
List of all members.

Public Types

typedef SmartPtr< ConnectionEventGeneratorsptr
typedef WeakPtr< ConnectionEventGeneratorwptr

Public Member Functions

void reg (NLsocket socket, const SmartPtr< ReceiveEventListener > &listener)
 Register a socket to receive events generated by this class.
void unreg (NLsocket socket)
 Removes a socket.
void shutDown ()
 Tells the event generator to shutdown.

Static Public Member Functions

static sptr create ()
 Creates a new instance of a ConnectionEventGenerator managed by a SmartPtr.

Protected Member Functions

void run ()

Detailed Description

A class used internally by GNE to generate the events in Connection.

Users of GNE should not need to use or know about this class. This class uses nlPollGroup to check for events comming in on sockets.


Member Function Documentation

void GNE::ConnectionEventGenerator::reg ( NLsocket  socket,
const SmartPtr< ReceiveEventListener > &  listener 
)

Register a socket to receive events generated by this class.

If the socket is already registered then this method has no effect (even if the registered listener is NOT the one passed!)

Parameters:
socket the low-level HawkNL socket for this connection.
conn the Connection class associated with the socket.

void GNE::ConnectionEventGenerator::run (  )  [protected, virtual]

Bug:
If nlPollGroup fails, the error is not reported. Instead the results are ignored, and the call is made again (or in debug mode, the assert fails).

Implements GNE::Thread.

void GNE::ConnectionEventGenerator::shutDown (  )  [virtual]

Tells the event generator to shutdown.

This function is called internally on library cleanup, so you should not call it.

Reimplemented from GNE::Thread.

void GNE::ConnectionEventGenerator::unreg ( NLsocket  socket  ) 

Removes a socket.

If the socket is not registered, then no action takes place. This method will not block to wait for the unregistration to take place.

Parameters:
socket the low-level HawkNL socket for this connection.


The documentation for this class was generated from the following files:
Generated on Tue Sep 5 23:47:46 2006 for GNE by  doxygen 1.4.7