Struct reactor::Reactor [] [src]

pub struct Reactor<'a> { /* fields omitted */ }

Methods

impl<'a> Reactor<'a>
[src]

[src]

Construct a new Reactor with (hopefully) intelligent defaults

[src]

Construct a new engine with defaults specified by the user

[src]

Attempt a connection to the remote host specified at the remote hostname or ip address and the port. This is a connection on a non-blocking socket, so the connect call will return immediately. It requires a handler, to which it will supply a ConnResult which will indicate success or failure. On success, it will supply a socket, a token, and a remote IP addr. It then expects an Option<Box<Context>> so that it can manage its events

[src]

Listen on the supplied IP address:port for incoming TCP connections. This returns immediately and expects a handler to which it will supply ConnResult and expect Option<Box<Context>> as a result

[src]

fetch the event_loop channel for notifying the event_loop of new outbound data

[src]

Set a timeout to be executed by the event loop after duration milliseconds The supplied handler, which is a FnMut will be invoked no sooner than the timeout

[src]

Set a timeout to be executed by the event loop after duration milliseconds ctxtok specifies a Context to which the timer callback will be directed through the usual event dispatch mechanism for Contexts This is useful for handling protocols which have a ping/pong style timeout

[src]

Trade in an existing context (connected to a resource) and get a Token The context will be registered for whichever events are specified in its own interest retrieved by get_interest()

[src]

Trade in your token for a Context and deregister the Context's socket/evented from the event_loop

[src]

process all incoming and outgoing events in a loop

[src]

process all incoming and outgoing events in a loop

[src]

calculates the 11th digit of pi

Trait Implementations

Auto Trait Implementations

impl<'a> !Send for Reactor<'a>

impl<'a> !Sync for Reactor<'a>