Struct quinn::generic::ServerConfig [−][src]
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]
S: Session,
pub fn new(token_key: <S as Session>::HmacKey) -> ServerConfig<S>
[src]
Create a default config with a particular token_key
pub fn token_key(
&mut self,
value: &[u8]
) -> Result<&mut ServerConfig<S>, ConfigError>
[src]
&mut self,
value: &[u8]
) -> Result<&mut ServerConfig<S>, ConfigError>
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 accept_buffer(&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]
&mut self,
cert_chain: CertificateChain,
key: PrivateKey
) -> Result<&mut ServerConfig<TlsSession>, TLSError>
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]
S: Session,
<S as Session>::ServerConfig: Clone,
pub fn clone(&self) -> ServerConfig<S>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S> Debug for ServerConfig<S> where
S: Session,
[src]
S: Session,
impl<S> Default for ServerConfig<S> where
S: Session,
[src]
S: Session,
pub fn default() -> ServerConfig<S>
[src]
Auto Trait Implementations
impl<S> RefUnwindSafe for ServerConfig<S> where
<S as Session>::HmacKey: RefUnwindSafe,
<S as Session>::ServerConfig: RefUnwindSafe,
<S as Session>::HmacKey: RefUnwindSafe,
<S as Session>::ServerConfig: RefUnwindSafe,
impl<S> Send for ServerConfig<S>
impl<S> Sync for ServerConfig<S>
impl<S> Unpin for ServerConfig<S> where
<S as Session>::ServerConfig: Unpin,
<S as Session>::ServerConfig: Unpin,
impl<S> UnwindSafe for ServerConfig<S> where
<S as Session>::HmacKey: RefUnwindSafe,
<S as Session>::ServerConfig: UnwindSafe,
<S as Session>::HmacKey: RefUnwindSafe,
<S as Session>::ServerConfig: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> 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<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,