Trait nexus::Configurer
[−]
[src]
pub trait Configurer<S> { fn add_socket(&mut self, socket: S, events: EventSet); fn add_socket_timeout(
&mut self,
socket: S,
events: EventSet,
timeout_ms: u64
); fn remove_socket(&mut self, token: Token); fn update_socket(&mut self, token: Token, events: EventSet); fn update_socket_timeout(
&mut self,
token: Token,
events: EventSet,
timeout_ms: u64
); fn shutdown(&mut self, error: Error); }
Trait to allow a Protocol implementation to configure the Reactor's sockets.
Required Methods
fn add_socket(&mut self, socket: S, events: EventSet)
Add socket to the Reactor.
fn add_socket_timeout(&mut self, socket: S, events: EventSet, timeout_ms: u64)
Add socket to the Reactor with a timeout.
fn remove_socket(&mut self, token: Token)
Remove the socket associated to the token from the Reactor.
fn update_socket(&mut self, token: Token, events: EventSet)
Update the socket associated to the token from the Reactor.
fn update_socket_timeout(
&mut self,
token: Token,
events: EventSet,
timeout_ms: u64
)
&mut self,
token: Token,
events: EventSet,
timeout_ms: u64
)
Update the socket associated to the token from the Reactor with a timeout.
fn shutdown(&mut self, error: Error)
Signal reactor to shutdown at the end of the current iteration.
The error passed in will be returned from the Reactor's run function. If this function is called more than once in a single iteration, the first error will be returned.