pingora_core::protocols::l4::ext

Function connect

Source
pub async fn connect(
    addr: &SocketAddr,
    bind_to: Option<&BindTo>,
) -> Result<TcpStream>
Expand description

connect() to the given address while optionally binding to the specific source address.

IP_BIND_ADDRESS_NO_PORT is used IP_LOCAL_PORT_RANGE is used if a port range is set on BindTo.