Skip to main content

connect_with_dcid

Function connect_with_dcid 

Source
pub fn connect_with_dcid(
    server_name: Option<&str>,
    scid: &ConnectionId<'_>,
    dcid: &ConnectionId<'_>,
    local: SocketAddr,
    peer: SocketAddr,
    config: &mut Config,
) -> Result<Connection>
Available on crate feature custom-client-dcid only.
Expand description

Creates a new client-side connection using the given DCID initially.

Be aware that RFC 9000 places requirements for unpredictability and length on the client DCID field. This function is dangerous if these requirements are not satisfied.

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.