ConnectionIdGenerator

Trait ConnectionIdGenerator 

Source
pub trait ConnectionIdGenerator {
    // Required methods
    fn generate(&mut self) -> ConnectionId;
    fn cid_len(&self) -> usize;

    // Provided method
    fn generate_cid_and_token(
        &mut self,
        reset_token_key: &Key,
    ) -> (ConnectionId, u128) { ... }
}
Expand description

Generate QUIC connection ID

Required Methods§

Source

fn generate(&mut self) -> ConnectionId

Generate a new CID

Source

fn cid_len(&self) -> usize

Return the length of a CID

Provided Methods§

Source

fn generate_cid_and_token( &mut self, reset_token_key: &Key, ) -> (ConnectionId, u128)

Generate a new CID and associated reset token.

Implementors§