IAdvancedSelectClient

IAdvancedSelectClient abstract class

Provides a set of interfaces which can be implemented by classes which desire notification of various events in the select client, and a set of corresponding methods which allow the user to pass an instance of these interfaces to an instance of this class: * IFinalizer interface, set by the finalizer() method, called when a select client is unregistered. * IErrorReporter interface, set by the error_reporter() method, called when an error occurs while handling a select client. * ITimeoutReporter interface, set by the timeout_reporter() method, called when a timeout occurs while handling a select client. * IConnectionInfo interface, set by the connection_info() method, called in debug(ISelectClient) mode when the selector wishes to get a string containing information about the connection a select client is using.

Members

Functions

error_
void error_(Exception exception, Event event)

Error reporting method, called when an Exception is caught from super.handle().

error_reporter
void error_reporter(IErrorReporter error_reporter_)

Sets the Error Reporter. May be set to null to disable error reporting.

finalize
void finalize(FinalizeStatus status)

Finalize method, called after this instance has been unregistered from the Dispatcher.

finalizer
void finalizer(IFinalizer finalizer_)

Sets the Finalizer. May be set to null to disable finalizing.

timeout
void timeout()

Timeout method, called after this a timeout has occurred in the SelectDispatcher.

timeout_reporter
void timeout_reporter(ITimeoutReporter timeout_reporter_)

Sets the TimeoutReporter. May be set to null to disable timeout reporting.

Interfaces

IErrorReporter
interface IErrorReporter
IFinalizer
interface IFinalizer
ITimeoutReporter
interface ITimeoutReporter

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