Struct domain::resolv::conf::ServerConf [] [src]

pub struct ServerConf {
    pub addr: SocketAddr,
    pub udp: ServerMode,
    pub tcp: ServerMode,
    pub request_timeout: Duration,
    pub keep_alive: Duration,
    pub recv_size: usize,
}

Configuration for one upstream DNS server.

The server is identified by a socket address, ie., an address/port pair. For each server you can set how it should operate on all supported transport protocols, including not at all, and two timeouts for each request and sockets. The timeouts are used for all transports. If you need different timeouts for, say, UDP and TCP, you can always use two server entries with the same address.

Fields

Server address.

Server mode for UDP transport.

Server mode for TCP transport.

How long to wait for a response before returning a timeout error.

How long to keep a connection open after a new request.

Size of the message receive buffer in bytes.

Methods

impl ServerConf
[src]

[src]

Returns a new default server config for the given address.

Trait Implementations

impl Clone for ServerConf
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ServerConf
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for ServerConf

impl Sync for ServerConf