Struct hickory_proto::xfer::BufDnsStreamHandle
source · pub struct BufDnsStreamHandle { /* private fields */ }
Expand description
A buffering stream bound to a SocketAddr
This stream handle ensures that all messages sent via this handle have the remote_addr set as the destination for the packet
Implementations§
source§impl BufDnsStreamHandle
impl BufDnsStreamHandle
sourcepub fn new(remote_addr: SocketAddr) -> (Self, StreamReceiver)
pub fn new(remote_addr: SocketAddr) -> (Self, StreamReceiver)
Constructs a new Buffered Stream Handle, used for sending data to the DNS peer.
§Arguments
remote_addr
- the address of the remote DNS system (client or server)sender
- the handle being used to send data to the server
sourcepub fn with_remote_addr(&self, remote_addr: SocketAddr) -> Self
pub fn with_remote_addr(&self, remote_addr: SocketAddr) -> Self
Associates a different remote address for any responses.
This is mainly useful in server use cases where the incoming address is only known after receiving a packet.
Trait Implementations§
source§impl Clone for BufDnsStreamHandle
impl Clone for BufDnsStreamHandle
source§fn clone(&self) -> BufDnsStreamHandle
fn clone(&self) -> BufDnsStreamHandle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl DnsStreamHandle for BufDnsStreamHandle
impl DnsStreamHandle for BufDnsStreamHandle
source§fn send(&mut self, buffer: SerialMessage) -> Result<(), ProtoError>
fn send(&mut self, buffer: SerialMessage) -> Result<(), ProtoError>
Sends a message to the Handle for delivery to the server.
Auto Trait Implementations§
impl Freeze for BufDnsStreamHandle
impl !RefUnwindSafe for BufDnsStreamHandle
impl Send for BufDnsStreamHandle
impl Sync for BufDnsStreamHandle
impl Unpin for BufDnsStreamHandle
impl !UnwindSafe for BufDnsStreamHandle
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more