EpollSelector.register

Associate a conduit to the selector and track specific I/O events. If a conduit is already associated, changes the events and attachment.

class EpollSelector
override
void
register

Parameters

conduit ISelectable

conduit that will be associated to the selector; must be a valid conduit (i.e. not null and open).

events Event

bit mask of Event values that represent the events that will be tracked for the conduit.

attachment Object

optional object with application-specific data that will be available when an event is triggered for the conduit

Throws

RegisteredConduitException if the conduit had already been registered to the selector; SelectorException if there are not enough resources to add the conduit to the selector.

Examples

selector.register(conduit, Event.Read | Event.Write, object);

Meta