SelectSelector.register

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

class SelectSelector
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.

Examples

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

Meta