pub struct TcpConnection { /* private fields */ }
Expand description
Connection for unconditionally sending and receiving DNS messages using TCP streams. Messages are sent with a two byte prefix that indicates the size of the message. Responses are expected to have the same prefix. The message ID of responses is checked to ensure it matches the request ID. If it does not, an error is returned.
Implementations§
Trait Implementations§
Source§impl ClientFactory<SocketAddr, TcpConnection> for TcpConnectionFactory
impl ClientFactory<SocketAddr, TcpConnection> for TcpConnectionFactory
Source§async fn make(&self, address: &SocketAddr) -> Result<TcpConnection, MtopError>
async fn make(&self, address: &SocketAddr) -> Result<TcpConnection, MtopError>
Create a new client instance based on its ID.
Auto Trait Implementations§
impl Freeze for TcpConnection
impl !RefUnwindSafe for TcpConnection
impl Send for TcpConnection
impl Sync for TcpConnection
impl Unpin for TcpConnection
impl !UnwindSafe for TcpConnection
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