TaskSelectClient

Undocumented in source.

Constructors

this
this(ISelectable iodev, int delegate() error_code_dg)

Constructor.

Members

Functions

error_
void error_(Exception exception, Event events)

Called if EPOLLERR was reported for the I/O device.

error_code
int error_code()
events
Event events()
fileHandle
Handle fileHandle()
finalize
void finalize(FinalizeStatus status)

Called after this instance was unregistered from epoll because either - handle() returned false (status.Success) or - the I/O device timed out (status.Timeout) or - EPOLLERR has been reported for the I/O device (status.Error).

handle
bool handle(Event events)

Resumes the task to handle events.

ioWait
Event ioWait(Event events_expected)

Suspends the current task until epoll reports any event in events_expected for the I/O device or the I/O device times out.

unregister
int unregister()

Unregisters the I/O device.

Inherited Members

From ISelectClient

ISelectable
alias ISelectable = .ISelectable

Convenience alias to avoid public imports

Event
alias Event = Epoll.Event

Enum of event types

FinalizeStatus
enum FinalizeStatus

Enum of the status when finalize() is called.

fileHandle
Handle fileHandle()

I/O device instance

events
Event events()

Events to register the conduit for.

timeout_us
ulong timeout_us;

Connection time out in microseconds. Effective only when used with an EpollSelectDispatcher which has timeouts enabled. A value of 0 has no effect.

expiry_registration
IExpiryRegistration expiry_registration(IExpiryRegistration expiry_registration_)

Sets the timeout manager expiry registration.

timed_out
bool timed_out()
handle
bool handle(Event event)

I/O event handler

timeout
void timeout()

Timeout method, called after a timeout occurs in the SelectDispatcher eventLoop. Intended to be overridden by a subclass if required.

finalize
void finalize(FinalizeStatus status)

Finalize method, called after this instance has been unregistered from the Dispatcher. Intended to be overridden by a subclass if required.

error
void error(Exception exception, Event event)

Error reporting method, called when an Exception is caught from handle(). Calls the error_() method, which should be overridden by a subclass if required.

error_
void error_(Exception exception, Event event)
Undocumented in source. Be warned that the author may not have intended to support it.
error_code
int error_code()

Obtains the current error code of the underlying I/O device.

registered
void registered()

Register method, called after this client is registered with the SelectDispatcher. Intended to be overridden by a subclass if required.

unregistered
void unregistered()

Unregister method, called after this client is unregistered from the SelectDispatcher. Intended to be overridden by a subclass if required.

is_registered
bool is_registered()

Returns true if this.conduit is currently registered for this.events with this as attachment. Returns false if this.conduit is not registered with epoll or, when multiple instances of this class share the same conduit, if it is registered with another instance.

timeout_value_us
ulong timeout_value_us()

ISelectClientInfo method.

registered_
void registered_()

Called by registered(); may be overridden by a subclass.

unregistered_
void unregistered_()

Called by unregistered(); may be overridden by a subclass.

id
cstring id()

Returns an identifier string of this instance. Defaults to the name of the class, but may be overridden if more detailed information is required.

toString
istring toString()

Returns a string describing this client, for use in debug messages.

fmtInfo
void fmtInfo(void delegate(cstring chunk) sink)

Produces a string containing information about this instance: Dynamic type, file descriptor and events.

Meta