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]
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]
&mut self,
factory: F
) -> &mut Self
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]
&mut self,
value: u64
) -> Result<&mut Self, ConfigError>
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]
&mut self,
supported_versions: Vec<u32>,
initial_version: u32
) -> Result<&mut Self, ConfigError>
Override supported QUIC versions
Trait Implementations
impl<S: Session> Clone for EndpointConfig<S>[src]
impl<S: Session> Clone for EndpointConfig<S>[src]fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<S: Session> Debug for EndpointConfig<S>[src]
impl<S: Session> Debug for EndpointConfig<S>[src]Auto Trait Implementations
impl<S> !RefUnwindSafe for EndpointConfig<S>
impl<S> !RefUnwindSafe for EndpointConfig<S>impl<S> Send for EndpointConfig<S>
impl<S> Send for EndpointConfig<S>impl<S> Sync for EndpointConfig<S>
impl<S> Sync for EndpointConfig<S>impl<S> Unpin for EndpointConfig<S>
impl<S> Unpin for EndpointConfig<S>impl<S> !UnwindSafe for EndpointConfig<S>
impl<S> !UnwindSafe for EndpointConfig<S>Blanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,