Function tcp_connect
pub async fn tcp_connect<Dns, Connector>(
extensions: &Extensions,
address: HostWithPort,
dns: Dns,
connector: Connector,
exec: Executor,
) -> Result<(TcpStream, SocketAddr), Box<dyn Error + Sync + Send>>where
Dns: DnsAddressResolver,
Connector: TcpStreamConnector + Clone,
<Connector as TcpStreamConnector>::Error: Into<Box<dyn Error + Sync + Send>> + Send + 'static,Available on crate feature
tcp only.Expand description
Establish a TcpStream connection for the given HostWithPort.
IPv4-mapped IPv6 addresses (::ffff:a.b.c.d) — whether given as an
IP literal host or resolved from AAAA records — are canonicalized to
the embedded IPv4 address, as they identify IPv4 wire traffic.