Trait reactor::Context
[−]
[src]
pub trait Context { fn on_event(&mut self, _: &mut ReactorCtrl, _: EventType); fn get_evented(&self) -> &Evented; fn get_interest(&self) -> EventSet; }
An abstraction over a socket or some other poll-able descriptor. Presently, anything that implements mio::Evented will do.
Required Methods
fn on_event(&mut self, _: &mut ReactorCtrl, _: EventType)
The primary event handler for the socket abstraction
fn get_evented(&self) -> &Evented
returns the socket so that it can be registered with the event-loop
fn get_interest(&self) -> EventSet
returns the current event interest for the loop to register with the poller