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