pub struct QuicTransportConfig {
pub listen_addr: SocketAddr,
pub tls: TlsConfig,
pub enable_0rtt: bool,
pub max_idle_timeout: Duration,
pub max_concurrent_bidi_streams: u32,
pub max_concurrent_uni_streams: u32,
pub use_bbr: bool,
}Expand description
QUIC transport configuration.
Fields§
§listen_addr: SocketAddrAddress to listen on.
tls: TlsConfigTLS configuration.
enable_0rtt: boolEnable 0-RTT for returning connections.
max_idle_timeout: DurationMaximum idle timeout before closing connection.
max_concurrent_bidi_streams: u32Maximum concurrent bidirectional streams per connection.
max_concurrent_uni_streams: u32Maximum concurrent unidirectional streams per connection.
use_bbr: boolUse BBR congestion control (vs Cubic).
Implementations§
Source§impl QuicTransportConfig
impl QuicTransportConfig
Sourcepub fn development() -> Self
pub fn development() -> Self
Create development configuration with self-signed cert.
Sourcepub fn production(
listen_addr: SocketAddr,
cert_path: impl Into<PathBuf>,
key_path: impl Into<PathBuf>,
) -> Self
pub fn production( listen_addr: SocketAddr, cert_path: impl Into<PathBuf>, key_path: impl Into<PathBuf>, ) -> Self
Create production configuration with certificate files.
Sourcepub fn with_listen_addr(self, addr: SocketAddr) -> Self
pub fn with_listen_addr(self, addr: SocketAddr) -> Self
Set listen address.
Sourcepub fn with_idle_timeout(self, timeout: Duration) -> Self
pub fn with_idle_timeout(self, timeout: Duration) -> Self
Set maximum idle timeout.
Sourcepub fn build_quinn_config(&self) -> Result<ServerConfig>
pub fn build_quinn_config(&self) -> Result<ServerConfig>
Build quinn ServerConfig from this configuration.
Trait Implementations§
Source§impl Clone for QuicTransportConfig
impl Clone for QuicTransportConfig
Source§fn clone(&self) -> QuicTransportConfig
fn clone(&self) -> QuicTransportConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuicTransportConfig
impl Debug for QuicTransportConfig
Auto Trait Implementations§
impl Freeze for QuicTransportConfig
impl RefUnwindSafe for QuicTransportConfig
impl Send for QuicTransportConfig
impl Sync for QuicTransportConfig
impl Unpin for QuicTransportConfig
impl UnwindSafe for QuicTransportConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more