Enum cdns_rs::a_sync::network::NetworkTap [−][src]
pub enum NetworkTap {
UdpStream {
sock: UdpSocket,
remote_addr: SocketAddr,
timeout: Duration,
},
}
Expand description
A types of the communication channels which are supported. It is used for data transmission between DNS client and DNS server.
Variants
A UDP stream
Fields of UdpStream
Implementations
pub async fn new_udp(
resolver_ip: &IpAddr,
bind_ip: Option<&IpAddr>,
timeout: Option<Duration>
) -> CDnsResult<Self>
Reads the remote host’s address and port and returns it.
Returns
- SocketAddr a reference to remote host address and port
Sends data over channel synchroniosly