NDConnHandler Class Reference

Provides an interface for responding to connection-related events, such as open, close, etc. More...

List of all members.

Public Member Functions

virtual void ndOnCreateConn (NDChannel *chan, NDConn *conn)=0
 This callback is each time a new conn is created, i.e. in response to new incoming client connection.
virtual void ndOnConnTimeout (NDChannel *chan, NDConn *conn)=0
 This callback is each time a conn times out.
virtual void ndOnConnClose (NDChannel *chan, NDConn *conn)=0
 This callback is each time a conn is closed.
virtual void ndOnConnReconnect (NDChannel *chan, NDConn *conn)=0
 This callback is each time a conn is reconnected.
virtual void ndOnDeleteConn (NDChannel *chan, NDConn *conn)=0
 This callback is each time a conn is deleted.

Detailed Description

Provides an interface for responding to connection-related events, such as open, close, etc.

To use this class, create a subclass which implements all the functions in this interface. Then, register the handler by calling NDCore::registerConnHandler.


Member Function Documentation

NDConnHandler::ndOnConnClose ( NDChannel chan,
NDConn conn 
) [pure virtual]
Parameters:
chan the channel the closed conn belongs to
conn the conn which closed
NDConnHandler::ndOnConnReconnect ( NDChannel chan,
NDConn conn 
) [pure virtual]
Parameters:
chan the channel the reconnected conn belongs to
conn the conn which reconnected
NDConnHandler::ndOnConnTimeout ( NDChannel chan,
NDConn conn 
) [pure virtual]
Parameters:
chan the channel the timed-out conn belongs to
conn the conn which timed out
NDConnHandler::ndOnCreateConn ( NDChannel chan,
NDConn conn 
) [pure virtual]
Parameters:
chan the channel on which the new conn was created
conn the new conn itself
NDConnHandler::ndOnDeleteConn ( NDChannel chan,
NDConn conn 
) [pure virtual]
Parameters:
chan the channel the deleted conn belongs to
conn the conn which was deleted (the conn is still valid until this callback returns)

Generated on Wed Jul 21 18:14:48 2010 for nd2 by  doxygen 1.6.1