You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: webrtc_transport.rs
    path of file: ./repos/mediasoup/rust/tests/integration
    
    the code of the file until where you have to start completion: use futures_lite::future;
use hash_hasher::HashedSet;
use mediasoup::data_structures::{
    AppData, DtlsFingerprint, DtlsParameters, DtlsRole, DtlsState, IceCandidateType, IceRole,
    IceState, ListenInfo, Protocol, SctpState,
};
use mediasoup::prelude::*;
use mediasoup::router::{Router, RouterOptions};
use mediasoup::rtp_parameters::{
    MimeTypeAudio, MimeTypeVideo, RtpCodecCapability, RtpCodecParametersParameters,
};
use mediasoup::sctp_parameters::{NumSctpStreams, SctpParameters};
use mediasoup::transport::TransportTraceEventType;
use mediasoup::webrtc_transport::{
    WebRtcTransportListenInfos, WebRtcTransportOptions, WebRtcTransportRemoteParameters,
};
use mediasoup::worker::{RequestError, Worker, WorkerSettings};
use mediasoup::worker_manager::WorkerManager;
use portpicker::pick_unused_port;
use std::convert::TryInto;
use std::env;
use std::net::{IpAddr, Ipv4Addr};
use std::num::{NonZeroU32, NonZeroU8};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;

struct CustomAppData {
    foo: &'static str,
}

fn media_codec
    
fn connect_succeeds() {
    future::block_on(async move {
        let (_worker, router) = init().await;

        let transport = router
            .create_webrtc_transport(WebRtcTransportOptions::new(
                WebRtcTransportListenInfos::new(ListenInfo {
                    protocol: Protocol::Udp,
                    ip: IpAddr::V4(Ipv4Addr::LOCALHOST),
                    announced_address: Some("9.9.9.1".to_string()),
                    port: None,
                    flags: None,
                    send_buffer_size: None,
                    recv_buffer_size: None,
                }),
            ))
            .await
            .expect("Failed to create WebRTC transport");

        let dtls_parameters = DtlsParameters {
            role: DtlsRole::Client,
            fingerprints: vec![DtlsFingerprint::Sha256 {
                value: [
                    0x82, 0x5A, 0x68, 0x3D, 0x36, 0xC3, 0x0A, 0xDE, 0xAF, 0xE7, 0x32, 0x43, 0xD2,
                    0x88, 0x83, 0x57, 0xAC, 0x2D, 0x65, 0xE5, 0x80, 0xC4, 0xB6, 0xFB, 0xAF, 0x1A,
                    0xA0, 0x21, 0x9F, 0x6D, 0x0C, 0xAD,
                ],
            }],
        };

        transport
            .connect(WebRtcTransportRemoteParameters {
                dtls_parameters: dtls_parameters.clone(),
            })
            .await
            .expect("Failed to establish WebRTC transport connection");

        // Must fail if connected.
        assert!(matches!(
            transport
                .connect(WebRtcTransportRemoteParameters { dtls_parameters })
                .await,
            Err(RequestError::Response { .. }),
        ));

        assert_eq!(transport.dtls_parameters().role, DtlsRole::Server);
    });
}