Struct domain::resolv::conf::ServerConf
[−]
[src]
pub struct ServerConf { pub addr: SocketAddr, pub udp: TransportMode, pub tcp: TransportMode, pub request_timeout: Duration, pub keep_alive: Duration, }
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
addr: SocketAddr
Server address.
udp: TransportMode
Transport mode for UDP transport.
tcp: TransportMode
Transport mode for TCP transport.
request_timeout: Duration
How long to wait for a response before returning a timeout error.
keep_alive: Duration
How long to keep a connection open after a new request.
Methods
impl ServerConf
[src]
fn new(addr: SocketAddr) -> Self
Returns a new default server config for the given address.
Trait Implementations
impl Clone for ServerConf
[src]
fn clone(&self) -> ServerConf
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more