pub struct QuicServerConfig { /* private fields */ }
Expand description
A QUIC-compatible TLS server configuration
Quinn implicitly constructs a QuicServerConfig
with reasonable defaults within
ServerConfig::with_single_cert()
. Alternatively, QuicServerConfig
’s TryFrom
implementation or with_initial
method can be used to wrap around a custom
rustls::ServerConfig
, in which case care should be taken around certain points:
- If
max_early_data_size
is not set tou32::MAX
, the server will not be able to accept incoming 0-RTT data. QUIC prohibitsmax_early_data_size
values other than 0 oru32::MAX
. - The
rustls::ServerConfig
must have TLS 1.3 support enabled for conversion to succeed.
Implementations§
Source§impl QuicServerConfig
impl QuicServerConfig
Sourcepub fn with_initial(
inner: Arc<ServerConfig>,
initial: Suite,
) -> Result<Self, NoInitialCipherSuite>
pub fn with_initial( inner: Arc<ServerConfig>, initial: Suite, ) -> Result<Self, NoInitialCipherSuite>
Initialize a QUIC-compatible TLS client configuration with a separate initial cipher suite
This is useful if you want to avoid the initial cipher suite for traffic encryption.
Trait Implementations§
Source§impl ServerConfig for QuicServerConfig
impl ServerConfig for QuicServerConfig
Source§fn start_session(
self: Arc<Self>,
version: u32,
params: &TransportParameters,
) -> Box<dyn Session>
fn start_session( self: Arc<Self>, version: u32, params: &TransportParameters, ) -> Box<dyn Session>
Start a server session with this configuration Read more
Source§fn initial_keys(
&self,
version: u32,
dst_cid: &ConnectionId,
) -> Result<Keys, UnsupportedVersion>
fn initial_keys( &self, version: u32, dst_cid: &ConnectionId, ) -> Result<Keys, UnsupportedVersion>
Create the initial set of keys given the client’s initial destination ConnectionId
Source§impl TryFrom<Arc<ServerConfig>> for QuicServerConfig
impl TryFrom<Arc<ServerConfig>> for QuicServerConfig
Source§impl TryFrom<ServerConfig> for QuicServerConfig
impl TryFrom<ServerConfig> for QuicServerConfig
Source§type Error = NoInitialCipherSuite
type Error = NoInitialCipherSuite
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for QuicServerConfig
impl !RefUnwindSafe for QuicServerConfig
impl Send for QuicServerConfig
impl Sync for QuicServerConfig
impl Unpin for QuicServerConfig
impl !UnwindSafe for QuicServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more