Function status_with_timeout

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

Similar to status 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 status does, and also when the response is not fully recieved within dur.