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
addr: SocketAddr
Server address.
udp: ServerMode
Server mode for UDP transport.
tcp: ServerMode
Server 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.
recv_size: usize
Size of the message receive buffer in bytes.
Methods
impl ServerConf
[src]
pub fn new(addr: SocketAddr) -> Self
[src]
Returns a new default server config for the given address.
Trait Implementations
impl Clone for ServerConf
[src]
fn clone(&self) -> ServerConf
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more