Trait timeout_io::WaitForEvent[][src]

pub trait WaitForEvent {
    fn wait_until_readable(&self, timeout: Duration) -> Result<()>;
fn wait_until_writeable(&self, timeout: Duration) -> Result<()>;
fn set_blocking_mode(&self, blocking: bool) -> Result<()>; }

This trait defines an API to wait for an event

Required Methods

Waits until self is ready for reading or timeout was reached

Parameters:

  • timeout: The maximum time this function will wait for self to become readable

Returns either nothing or a corresponding IoError

Waits until self is ready for writing or timeout was reached

Parameters:

  • timeout: The maximum time this function will wait for self to become writeable

Returns either nothing or a corresponding IoError

Makes self blocking or non-blocking

Parameters:

  • blocking: Set to true if you want to make the socket blocking, false otherwise

Returns either nothing or a corresponding IoError

Implementors