Struct umio::Provider
[−]
[src]
pub struct Provider<'a, D: Dispatcher + 'a> { /* fields omitted */ }
Provides services to dispatcher clients.
Methods
impl<'a, D: Dispatcher> Provider<'a, D>
[src]
fn channel(&self) -> Sender<D::Message>
Grab a channel to send messages to the event loop.
fn outgoing<F>(&mut self, out: F) where
F: FnOnce(&mut [u8]) -> Option<(usize, SocketAddr)>,
F: FnOnce(&mut [u8]) -> Option<(usize, SocketAddr)>,
Execute a closure with a buffer and send the buffer contents to the destination address or reclaim the buffer and do not send anything.
fn set_timeout(&mut self, token: D::Timeout, delay: u64) -> TimerResult<Timeout>
Set a timeout with the given delay and token.
fn clear_timeout(&mut self, timeout: Timeout) -> bool
Clear a timeout using the provided timeout identifier.
fn shutdown(&mut self)
Shutdown the event loop.