[][src]Struct trust_dns_proto::udp::UdpClientStream

#[must_use = "futures do nothing unless polled"]
pub struct UdpClientStream<S, MF = NoopMessageFinalizer> where
    S: Send,
    MF: MessageFinalizer
{ /* fields omitted */ }

A UDP client stream of DNS binary packets

This stream will create a new UDP socket for every request. This is to avoid potential cache poisoning during use by UDP based attacks.

Methods

impl<S: Send> UdpClientStream<S, NoopMessageFinalizer>[src]

Important traits for UdpClientConnect<S, MF>
pub fn new(name_server: SocketAddr) -> UdpClientConnect<S, NoopMessageFinalizer>[src]

it is expected that the resolver wrapper will be responsible for creating and managing new UdpClients such that each new client would have a random port (reduce chance of cache poisoning)

Return

a tuple of a Future Stream which will handle sending and receiving messages, and a handle which can be used to send messages into the stream.

Important traits for UdpClientConnect<S, MF>
pub fn with_timeout(
    name_server: SocketAddr,
    timeout: Duration
) -> UdpClientConnect<S, NoopMessageFinalizer>
[src]

Constructs a new UdpStream for a client to the specified SocketAddr.

Arguments

  • name_server - the IP and Port of the DNS server to connect to
  • timeout - connection timeout

impl<S: Send, MF: MessageFinalizer> UdpClientStream<S, MF>[src]

Important traits for UdpClientConnect<S, MF>
pub fn with_timeout_and_signer(
    name_server: SocketAddr,
    timeout: Duration,
    signer: Option<Arc<MF>>
) -> UdpClientConnect<S, MF>
[src]

Constructs a new TcpStream for a client to the specified SocketAddr.

Arguments

  • name_server - the IP and Port of the DNS server to connect to
  • timeout - connection timeout

Trait Implementations

impl<S: UdpSocket + Send + 'static, MF: MessageFinalizer> DnsRequestSender for UdpClientStream<S, MF>[src]

type DnsResponseFuture = UdpResponse

A future that resolves to a response serial message

impl<S: Send, MF: MessageFinalizer> Display for UdpClientStream<S, MF>[src]

impl<S: Send, MF: MessageFinalizer> Stream for UdpClientStream<S, MF>[src]

type Item = Result<(), ProtoError>

Values yielded by the stream.

Auto Trait Implementations

impl<S, MF> Send for UdpClientStream<S, MF>

impl<S, MF> Sync for UdpClientStream<S, MF> where
    S: Sync

impl<S, MF> Unpin for UdpClientStream<S, MF> where
    S: Unpin

impl<S, MF> UnwindSafe for UdpClientStream<S, MF> where
    MF: RefUnwindSafe,
    S: UnwindSafe

impl<S, MF> RefUnwindSafe for UdpClientStream<S, MF> where
    MF: RefUnwindSafe,
    S: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,