fn block_gather_local_candidates(
    rx: Receiver<IceCandidate>,
    max_items: usize,
    timeout: Duration,
) -> Vec<IceCandidate> {
    let mut received = vec![];
    let mut continue_polling = true;

    while continue_polling && (received.len() < max_items) {
        match rx.recv_timeout(timeout) {
            Ok(c) => received.push(c),
            _ => {
                continue_polling = false;
            }
        };
    }

    received
}
/// Waits until we have gathered all of the candidates for the local description
Waits until we have gathered all of the candidates for the local description
Waits until we have gathered all of the candidates for the local description
fn block_gather_local_candidates(
    rx: Receiver<IceCandidate>,
    max_items: usize,
    timeout: Duration,
) -> Vec<IceCandidate> {
    let mut received = vec![];
    let mut continue_polling = true;
    while continue_polling && (received.len() < max_items) {
        match rx.recv_timeout(timeout) {
            Ok(c) => received.push(c),
            _ => {
                continue_polling = false;
            }
        };
    }
    received
}
fn block_gather_local_candidates ( rx : Receiver < IceCandidate > , max_items : usize , timeout : Duration , ) -> Vec < IceCandidate > { let mut received = vec ! [ ] ; let mut continue_polling = true ; while continue_polling && ( received . len ( ) < max_items ) { match rx . recv_timeout ( timeout ) { Ok ( c ) => received . push ( c ) , _ => { continue_polling = false ; } } ; } received }
Waits until we have gathered all of the candidates for the local description
Waits until we have gathered all of the candidates for the local description
rx
Receiver<IceCandidate>
max_items
usize
timeout
Duration
rx
Receiver<IceCandidate>
max_items
usize
timeout
Duration