Struct trust_dns::tcp::TcpClientConnection
[−]
[src]
pub struct TcpClientConnection { /* fields omitted */ }
Tcp client connection
Use with trust_dns::client::Client
impls
Methods
impl TcpClientConnection
[src]
fn new(name_server: SocketAddr) -> ClientResult<Self>
Creates a new client connection.
Note this has side affects of establishing the connection to the specified DNS server and starting the event_loop. Expect this to change in the future.
Default connection timeout is 5 seconds
Arguments
name_server
- address of the name server to use for queries
fn with_timeout(
name_server: SocketAddr,
timeout: Duration
) -> ClientResult<Self>
name_server: SocketAddr,
timeout: Duration
) -> ClientResult<Self>
Creates a new client connection.
Note this has side affects of establishing the connection to the specified DNS server and starting the event_loop. Expect this to change in the future.
Arguments
name_server
- address of the name server to use for queries
Trait Implementations
impl ClientConnection for TcpClientConnection
[src]
type MessageStream = TcpClientStream<TcpStream>
The associated DNS Message stream type.
fn unwrap(
self
) -> (Core, Box<Future<Item = Self::MessageStream, Error = Error>>, Box<ClientStreamHandle>)
self
) -> (Core, Box<Future<Item = Self::MessageStream, Error = Error>>, Box<ClientStreamHandle>)
Return the inner Futures items Read more