pub fn new_tcp(
resolver_ip: &IpAddr,
resolver_port: u16,
bind_addr: &SocketAddr,
timeout: Duration,
) -> CDnsResult<Box<NetworkTapType>>
Expand description
Creates new instance of TcpStream. The stream is not connected and SocketTap::connect should be called.
§Arguments
-
resolver_ip
- a ref to IpAddr which holds host address of the nameserver. -
resolver_port
- a port number binded by nameserver -
bind_addr
- a local address to bind the socket to
§Returns
-
CDnsResult - Ok with inner type Box dyn SocketTap
-
CDnsResult - Err with error description