Function connect

Source
pub async fn connect<Tx, Rx, S>(
    socket: S,
    host: Option<&str>,
) -> QuicResult<(QuicConnection, ClientH3Controller)>
where Tx: DatagramSocketSend + Send + 'static, Rx: DatagramSocketRecv + Unpin + 'static, S: TryInto<Socket<Tx, Rx>>, S::Error: Error + Send + Sync + 'static,
Expand description

Connects to an HTTP/3 server using socket and the default client configuration.

This function always uses the ApplicationOverQuic provided in http3::driver and returns a corresponding ClientH3Controller. To specify a different implementation or customize the configuration, use connect_with_config.

ยงNote

tokio-quiche currently only supports one client connection per socket. Sharing a socket among multiple connections will lead to lost packets as both connections try to read from the shared socket.