ISelectClient

ISelectClient abstract class

Members

Aliases

Event
alias Event = Epoll.Event

Enum of event types

ISelectable
alias ISelectable = .ISelectable

Convenience alias to avoid public imports

Enums

FinalizeStatus
enum FinalizeStatus

Enum of the status when finalize() is called.

Functions

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.

events
Event events()

Events to register the conduit for.

expiry_registration
IExpiryRegistration expiry_registration(IExpiryRegistration expiry_registration_)

Sets the timeout manager expiry registration.

fileHandle
Handle fileHandle()

I/O device instance

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.

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

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

handle
bool handle(Event event)

I/O event handler

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.

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.

registered
void registered()

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

registered_
void registered_()

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

timed_out
bool timed_out()
timeout
void timeout()

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

timeout_value_us
ulong timeout_value_us()

ISelectClientInfo method.

toString
istring toString()

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

unregistered
void unregistered()

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

unregistered_
void unregistered_()

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

Variables

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.

Inherited Members

From ITimeoutClient

timeout
void timeout()

Invoked when the client times out.

id
cstring id()

Identifier string for debugging.

From ISelectable

fileHandle
Handle fileHandle()

Models a handle-oriented device.

From ISelectClientInfo

fileHandle
ISelectable.Handle fileHandle()
events
Epoll.Event events()
timeout_value_us
ulong timeout_value_us()
timed_out
bool timed_out()
is_registered
bool is_registered()

Returns true if the client's file handle is registered with epoll for the events specified with the client reference as attachment. Returns false if the client's file handle is not registered with epoll or, when multiple instances of the implementing class share the same file handle, if it is registered with another instance.

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.

Meta