Enum cdns_rs::sync::network::NetworkTap [−][src]
pub enum NetworkTap {
UdpStream {
sock: UdpSocket,
remote_addr: SocketAddr,
},
}
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
sock: UdpSocket
remote_addr: SocketAddr
Implementations
pub 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
Blocks the current thread until sent