Dirk



class  IrcEventLoop;

A collection of irc.client.IrcClient objects for efficiently handling incoming data.


this();

Create a new event loop.


void delegate(IrcClient, Exception)[]  onError;

Invoked when an error occurs for a client in the set.

If no handlers are registered, the error will be propagated out of IrcEventLoop.run. The client will always be removed from the set. Throwing from a handler is allowed but will cause any subsequent registered handlers not to be called and the exception will keep propagating.


void  add(IrcClient client);

Add a connected client to the set, or do nothing if the client is already in the set.

The client is automatically removed if it is disconnected inside an event callback registered on the client. If the client is disconnected outside the event loop, it is the caller's responsibility to call IrcEventLoop.remove.

Parameters
IrcClient client client to add
Throws
irc.exception.UnconnectedClientException if client is not connected.

void  remove(IrcClient client);

Remove a client from the set, or do nothing if the client is not in the set.

Parameters
IrcClient client client to remove

void  post(void delegate() callback);

Run the specified callback at the next idle event.


Timer  post(void delegate() callback, double time);

Run the specified callback as soon as possible after time has elapsed.

Equivalent to postTimer(callback, time, TimerRepeat.no).


Timer  postTimer(void delegate() callback, double interval, TimerRepeat repeat);

Run callback at every interval, or just once after interval time has elapsed if repeat is TimerRepeat.no.


void  run();

Handle incoming data for the clients in the set.

The incoming data is handled by the respective client, and callbacks are called. Returns when all clients are no longer connected, or immediately if there are no clients in the set.