Function quiche::connect

source ·
pub fn connect(
    server_name: Option<&str>,
    scid: &ConnectionId<'_>,
    local: SocketAddr,
    peer: SocketAddr,
    config: &mut Config,
) -> Result<Connection>
Expand description

Creates a new client-side connection.

The scid parameter is used as the connection’s source connection ID, while the optional server_name parameter is used to verify the peer’s certificate.


let conn =
    quiche::connect(Some(&server_name), &scid, local, peer, &mut config)?;