Struct quinn_proto::generic::ServerConfig [−][src]
pub struct ServerConfig<S> where
S: Session, { pub transport: Arc<TransportConfig>, pub crypto: S::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::ServerConfigTLS configuration used for incoming connections.
Must be set to use TLS 1.3 only.
Implementations
impl<S> ServerConfig<S> where
S: Session, [src]
impl<S> ServerConfig<S> where
S: Session, [src]pub fn new(prk: S::HandshakeTokenKey) -> Self[src]
Create a default config with a particular master_key
pub fn token_key(&mut self, master_key: &[u8]) -> Result<&mut Self, ConfigError>[src]
Private key used to authenticate data included in handshake tokens.
pub fn use_stateless_retry(&mut self, value: bool) -> &mut Self[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 Self[src]
Microseconds after a stateless retry token was issued for which it’s considered valid.
pub fn concurrent_connections(&mut self, value: u32) -> &mut Self[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 Self[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]
impl ServerConfig<TlsSession>[src]pub fn certificate(
&mut self,
cert_chain: CertificateChain,
key: PrivateKey
) -> Result<&mut Self, TLSError>[src]
&mut self,
cert_chain: CertificateChain,
key: PrivateKey
) -> Result<&mut Self, TLSError>
Set the certificate chain that will be presented to clients
Trait Implementations
impl<S> Clone for ServerConfig<S> where
S: Session,
S::ServerConfig: Clone, [src]
impl<S> Clone for ServerConfig<S> where
S: Session,
S::ServerConfig: Clone, [src]fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<S> Debug for ServerConfig<S> where
S: Session, [src]
impl<S> Debug for ServerConfig<S> where
S: Session, [src]Auto Trait Implementations
impl<S> !RefUnwindSafe for ServerConfig<S>
impl<S> !RefUnwindSafe for ServerConfig<S>impl<S> Send for ServerConfig<S>
impl<S> Send for ServerConfig<S>impl<S> Sync for ServerConfig<S>
impl<S> Sync for ServerConfig<S>impl<S> Unpin for ServerConfig<S> where
<S as Session>::ServerConfig: Unpin,
impl<S> Unpin for ServerConfig<S> where
<S as Session>::ServerConfig: Unpin, impl<S> !UnwindSafe for ServerConfig<S>
impl<S> !UnwindSafe for ServerConfig<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>,