Struct quinn::generic::ServerConfig[][src]

pub struct ServerConfig<S> where
    S: Session
{ pub transport: Arc<TransportConfig>, pub crypto: <S as Session>::ServerConfig, // some fields omitted }

Parameters governing incoming connections

Default values should be suitable for most internet applications.

Fields

transport: Arc<TransportConfig>

Transport configuration to use for incoming connections

crypto: <S as Session>::ServerConfig

TLS configuration used for incoming connections.

Must be set to use TLS 1.3 only.

Implementations

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

pub fn new(prk: <S as Session>::HandshakeTokenKey) -> ServerConfig<S>[src]

Create a default config with a particular master_key

pub fn token_key(
    &mut self,
    master_key: &[u8]
) -> Result<&mut ServerConfig<S>, ConfigError>
[src]

Private key used to authenticate data included in handshake tokens.

pub fn use_stateless_retry(&mut self, value: bool) -> &mut ServerConfig<S>[src]

Whether to require clients to prove ownership of an address before committing resources.

Introduces an additional round-trip to the handshake to make denial of service attacks more difficult.

pub fn retry_token_lifetime(&mut self, value: u64) -> &mut ServerConfig<S>[src]

Microseconds after a stateless retry token was issued for which it’s considered valid.

pub fn concurrent_connections(&mut self, value: u32) -> &mut ServerConfig<S>[src]

Maximum number of incoming connections to buffer.

Accepting a connection removes it from the buffer, so this does not need to be large.

pub fn migration(&mut self, value: bool) -> &mut ServerConfig<S>[src]

Whether to allow clients to migrate to new addresses

Improves behavior for clients that move between different internet connections or suffer NAT rebinding. Enabled by default.

impl ServerConfig<TlsSession>[src]

pub fn certificate(
    &mut self,
    cert_chain: CertificateChain,
    key: PrivateKey
) -> Result<&mut ServerConfig<TlsSession>, TLSError>
[src]

Set the certificate chain that will be presented to clients

Trait Implementations

impl<S> Clone for ServerConfig<S> where
    S: Session,
    <S as Session>::ServerConfig: Clone
[src]

impl<S> Debug for ServerConfig<S> where
    S: Session
[src]

impl<S> Default for ServerConfig<S> where
    S: Session
[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for ServerConfig<S>

impl<S> Send for ServerConfig<S>

impl<S> Sync for ServerConfig<S>

impl<S> Unpin for ServerConfig<S> where
    <S as Session>::ServerConfig: Unpin

impl<S> !UnwindSafe for ServerConfig<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>,