AsyncEvent

Takes a raw kernel-emitted file descriptor and registers its events into the event loop for async processing NOTE: If it's a socket, it must be made non-blocking before being passed here. NOTE: By default dispatched events are READ, WRITE, and ERROR; enabling 'stateful' adds CONNECT and CLOSE

Constructors

this
this(EventLoop evl, fd_t ev_id, bool stateful = false)

Members

Functions

kill
bool kill(bool forced = false)

Removes the event from the event loop, closing the file descriptor if necessary, and cleans up the underlying resources.

run
bool run(void delegate(EventCode) del)

Registers the signal handler in the event loop

Properties

error
string error [@property getter]

Human-readable string describing the error

hasError
bool hasError [@property getter]
id
fd_t id [@property getter]
owner
Thread owner [@property getter]

Returns the Thread that created this object.

status
StatusInfo status [@property getter]

Used to diagnose errors when run() or kill() returns false

Meta