pub trait ServerConfig: Send + Sync {
    // Required methods
    fn initial_keys(
        &self,
        version: u32,
        dst_cid: &ConnectionId,
        side: Side
    ) -> Result<Keys, UnsupportedVersion>;
    fn retry_tag(
        &self,
        version: u32,
        orig_dst_cid: &ConnectionId,
        packet: &[u8]
    ) -> [u8; 16];
    fn start_session(
        self: Arc<Self>,
        version: u32,
        params: &TransportParameters
    ) -> Box<dyn Session>;
}
Expand description

Server-side configuration for the crypto protocol

Required Methods§

source

fn initial_keys( &self, version: u32, dst_cid: &ConnectionId, side: Side ) -> Result<Keys, UnsupportedVersion>

Create the initial set of keys given the client’s initial destination ConnectionId

source

fn retry_tag( &self, version: u32, orig_dst_cid: &ConnectionId, packet: &[u8] ) -> [u8; 16]

Generate the integrity tag for a retry packet

Never called if initial_keys rejected version.

source

fn start_session( self: Arc<Self>, version: u32, params: &TransportParameters ) -> Box<dyn Session>

Start a server session with this configuration

Never called if initial_keys rejected version.

Implementations on Foreign Types§

source§

impl ServerConfig for ServerConfig

source§

fn start_session( self: Arc<ServerConfig>, version: u32, params: &TransportParameters ) -> Box<dyn Session>

source§

fn initial_keys( &self, version: u32, dst_cid: &ConnectionId, side: Side ) -> Result<Keys, UnsupportedVersion>

source§

fn retry_tag( &self, version: u32, orig_dst_cid: &ConnectionId, packet: &[u8] ) -> [u8; 16]

Implementors§