Struct quinn_proto::generic::EndpointConfig[][src]

pub struct EndpointConfig<S> where
    S: Session
{ /* fields omitted */ }

Global configuration for the endpoint, affecting all connections

Default values should be suitable for most internet applications.

Implementations

impl<S> EndpointConfig<S> where
    S: Session
[src]

pub fn new(reset_key: S::HmacKey) -> Self[src]

Create a default config with a particular reset_key

pub fn cid_generator<F: Fn() -> Box<dyn ConnectionIdGenerator> + Send + Sync + 'static>(
    &mut self,
    factory: F
) -> &mut Self
[src]

Supply a custom connection ID generator factory

Called once by each Endpoint constructed from this configuration to obtain the CID generator which will be used to generate the CIDs used for incoming packets on all connections involving that Endpoint. A custom CID generator allows applications to embed information in local connection IDs, e.g. to support stateless packet-level load balancers.

EndpointConfig::new() applies a default random CID generator factory. This functions accepts any customized CID generator to reset CID generator factory that implements the ConnectionIdGenerator trait.

pub fn reset_key(&mut self, value: &[u8]) -> Result<&mut Self, ConfigError>[src]

Private key used to send authenticated connection resets to peers who were communicating with a previous instance of this endpoint.

pub fn max_udp_payload_size(
    &mut self,
    value: u64
) -> Result<&mut Self, ConfigError>
[src]

Maximum UDP payload size accepted from peers. Excludes UDP and IP overhead.

The default is suitable for typical internet applications. Applications which expect to run on networks supporting Ethernet jumbo frames or similar should set this appropriately.

pub fn supported_versions(
    &mut self,
    supported_versions: Vec<u32>,
    initial_version: u32
) -> Result<&mut Self, ConfigError>
[src]

Override supported QUIC versions

Trait Implementations

impl<S: Session> Clone for EndpointConfig<S>[src]

impl<S: Session> Debug for EndpointConfig<S>[src]

impl<S: Session> Default for EndpointConfig<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for EndpointConfig<S>

impl<S> Send for EndpointConfig<S>

impl<S> Sync for EndpointConfig<S>

impl<S> Unpin for EndpointConfig<S>

impl<S> !UnwindSafe for EndpointConfig<S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,