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]
impl TcpClientConnection
pub fn new(name_server: SocketAddr) -> ClientResult<Self>
[src]
pub 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
pub fn with_timeout(
name_server: SocketAddr,
timeout: Duration
) -> ClientResult<Self>
[src]
pub fn with_timeout(
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 Clone for TcpClientConnection
[src]
impl Clone for TcpClientConnection
fn clone(&self) -> TcpClientConnection
[src]
fn clone(&self) -> TcpClientConnection
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl ClientConnection for TcpClientConnection
[src]
impl ClientConnection for TcpClientConnection
type Sender = DnsMultiplexer<TcpClientStream<TcpStream>, Signer>
The associated DNS RequestSender type.
type Response = <Self::Sender as DnsRequestSender>::DnsResponseFuture
Response type of the RequestSender
type SenderFuture = DnsMultiplexerConnect<TcpClientStream<TcpStream>, Signer>
A future that resolves to the RequestSender
fn new_stream(
&self,
signer: Option<Arc<Signer>>
) -> (DnsExchangeConnect<Self::SenderFuture, Self::Sender, Self::Response>, DnsRequestStreamHandle<Self::Response>)
[src]
fn new_stream(
&self,
signer: Option<Arc<Signer>>
) -> (DnsExchangeConnect<Self::SenderFuture, Self::Sender, Self::Response>, DnsRequestStreamHandle<Self::Response>)
Construct a new stream for use in the Client
Auto Trait Implementations
impl Send for TcpClientConnection
impl Send for TcpClientConnection
impl Sync for TcpClientConnection
impl Sync for TcpClientConnection