ITimerEvent

ITimerEvent base class with abstract handle method.

Constructors

this
this(bool realtime)

Constructor. Creates a file descriptor to manage the event.

Members

Aliases

TimerException
alias TimerException = TimerFD.TimerException

Convenience and compatibility alias.

Functions

absolute
bool absolute()
absolute
void absolute(bool abs)

Sets the timer to absolute or relative mode.

events
Event events()
fileHandle
Handle fileHandle()

Required by ISelectable interface.

handle
bool handle(Event event)

Event handler, invoked by the epoll select dispatcher.

handle_
bool handle_(ulong n)

Timer expiration event handler.

id
cstring id()

Returns an identifier string for this instance

reset
itimerspec reset()

Resets/disarms the timer.

set
itimerspec set(timespec first, timespec interval)

Sets next expiration time of interval timer.

set
itimerspec set(time_t first_s, uint first_ms, time_t interval_s, uint interval_ms)

Sets next expiration time of interval timer.

time
itimerspec time()

Returns the next expiration time.

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.

From ISelectable

fileHandle
Handle fileHandle()

Models a handle-oriented device.

Meta