XmlRpc::XmlRpcDispatch Class Reference

An object which monitors file descriptors for events and performs callbacks when interesting events happen. More...

#include <XmlRpcDispatch.h>

List of all members.

Public Types

enum  EventType { ReadableEvent = 1, WritableEvent = 2, Exception = 4 }
 Values indicating the type of events a source is interested in. More...

Public Member Functions

 XmlRpcDispatch ()
 Constructor.
void addSource (XmlRpcSource *source, unsigned eventMask)
 Monitor this source for the event types specified by the event mask and call its event handler when any of the events occur.
void removeSource (XmlRpcSource *source)
 Stop monitoring this source.
void setSourceEvents (XmlRpcSource *source, unsigned eventMask)
 Modify the types of events to watch for on this source.
void work (double msTime)
 Watch current set of sources and process events for the specified duration (in ms, -1 implies wait forever, or until exit is called).
void exit ()
 Exit from work routine.
void clear ()
 Clear all sources from the monitored sources list. Sources are closed.

Protected Types

typedef std::list
< MonitoredSource > 
SourceList

Protected Member Functions

double getTime ()

Protected Attributes

SourceList _sources
double _endTime
bool _doClear
bool _inWork


Detailed Description

An object which monitors file descriptors for events and performs callbacks when interesting events happen.


Member Enumeration Documentation

Values indicating the type of events a source is interested in.

Enumerator:
ReadableEvent  data available to read
WritableEvent  connected/data can be written without blocking
Exception  uh oh


Member Function Documentation

void XmlRpcDispatch::addSource ( XmlRpcSource source,
unsigned  eventMask 
)

Monitor this source for the event types specified by the event mask and call its event handler when any of the events occur.

Parameters:
source The source to monitor
eventMask Which event types to watch for.
See also:
EventType

Referenced by XmlRpc::XmlRpcServer::acceptConnection(), and XmlRpc::XmlRpcServer::bindAndListen().

void XmlRpcDispatch::removeSource ( XmlRpcSource source  ) 

Stop monitoring this source.

Parameters:
source The source to stop monitoring

Referenced by XmlRpc::XmlRpcClient::close(), and XmlRpc::XmlRpcServer::removeConnection().


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 22:40:05 2008 for XmlRpc++ by  doxygen 1.5.5