SelectReader

SelectReader without Fiber

This is useful for when you want to read when there is something to read but you don't want to block/wait/suspend your fiber when there is nothing.

Constructors

this
this(IInputDevice input, size_t buffer_size, IOWarning warning_e, IOError error_e)

Constructor

Members

Functions

events
Event events()
fileHandle
Handle fileHandle()
handle
bool handle(Event events)

Handle socket events

read
void read(void delegate(void[] data) dg)

Feed delegate with data that was read.

Variables

error_e
IOError error_e;

IOError exception instance

warning_e
IOWarning warning_e;

IOWarning exception instance

Inherited Members

From IAdvancedSelectClient

IFinalizer
interface IFinalizer
IErrorReporter
interface IErrorReporter
ITimeoutReporter
interface ITimeoutReporter
finalizer
void finalizer(IFinalizer finalizer_)

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

timeout_reporter
void timeout_reporter(ITimeoutReporter timeout_reporter_)

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

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.

error_
void error_(Exception exception, Event event)

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

timeout
void timeout()

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

Meta