Function stat_basic_with_timeout

Source
pub async fn stat_basic_with_timeout(
    host: &str,
    port: u16,
    dur: Duration,
) -> Result<BasicStatResponse>
Expand description

Similar to stat_basic but with an added argument for timeout.

Note that timeouts are not precise, and may vary on the order of milliseconds, because of the way the async event loop works.

§Arguments

  • host - A string slice that holds the hostname of the server to connect to.
  • port - The port to connect to on that server.

§Errors

Returns Err on any condition that stat_basic does, and also when the response is not fully recieved within dur.