pub struct QueryClient { /* private fields */ }
This is supported on crate feature tokio only.
Expand description

An asynchronous Query client using the tokio networking primitives.

Implementations

Build a new QueryClient from the given IP address.

If not port is specified in the IP address, the default port is used.

The default timeout duration is used.

Build a new QueryClient from the given IP address and port.

If the IP address already contains a port, an error is returned.

The default timeout duration is used.

Builds a new QueryClient from the given IP address, port, socket address and optional timeout.

The IP adress must not contain a port.

Receive a UDP packet from the client socket.

Send a UDP handshake packet to the client socket.

Receive and parse the response into a Query token, valid up to 30 seconds.

Request and wait for a basic status packet on the client socket.

If the token is no longer valid, no packet is received and an error is returned.

Request and wait for a full status packet on the client socket.

If the token is no longer valid, no packet is received and an error is returned.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.