#include <XmlRpcDispatch.h>
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 |
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.
source | The source to monitor | |
eventMask | Which event types to watch for. |
Referenced by XmlRpc::XmlRpcServer::acceptConnection(), and XmlRpc::XmlRpcServer::bindAndListen().
void XmlRpcDispatch::removeSource | ( | XmlRpcSource * | source | ) |
Stop monitoring this source.
source | The source to stop monitoring |
Referenced by XmlRpc::XmlRpcClient::close(), and XmlRpc::XmlRpcServer::removeConnection().