pub struct ServerBuilder { /* private fields */ }Expand description
Construct a WebTransport Server using sensible defaults.
This is optional; advanced users may use Server::new directly.
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn with_addr(self, addr: SocketAddr) -> Self
pub fn with_addr(self, addr: SocketAddr) -> Self
Listen on the specified address.
Sourcepub fn with_congestion_control(self, algorithm: CongestionControl) -> Self
pub fn with_congestion_control(self, algorithm: CongestionControl) -> Self
Enable the specified congestion controller.
Sourcepub fn with_transport_config(self, transport: TransportConfig) -> Self
pub fn with_transport_config(self, transport: TransportConfig) -> Self
Replace the QUIC transport configuration.
Use this to bound receive windows, concurrent streams, datagram buffers, idle time, and other per-connection resources.
Sourcepub fn with_handshake_timeout(self, timeout: Duration) -> Self
pub fn with_handshake_timeout(self, timeout: Duration) -> Self
Limit the combined QUIC, HTTP/3 SETTINGS, and CONNECT handshake duration.
Sourcepub fn with_max_pending_handshakes(self, limit: NonZeroUsize) -> Self
pub fn with_max_pending_handshakes(self, limit: NonZeroUsize) -> Self
Limit the number of handshakes retained before accepting another connection.
Sourcepub fn with_certificate(
self,
chain: Vec<CertificateDer<'static>>,
key: PrivateKeyDer<'static>,
) -> Result<Server, ServerError>
pub fn with_certificate( self, chain: Vec<CertificateDer<'static>>, key: PrivateKeyDer<'static>, ) -> Result<Server, ServerError>
Supply a certificate used for TLS.
Sourcepub fn with_certificates(
self,
certificates: Vec<(String, Vec<CertificateDer<'static>>, PrivateKeyDer<'static>)>,
) -> Result<Server, ServerError>
pub fn with_certificates( self, certificates: Vec<(String, Vec<CertificateDer<'static>>, PrivateKeyDer<'static>)>, ) -> Result<Server, ServerError>
Supply certificates for multiple hostnames using SNI.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerBuilder
impl !UnwindSafe for ServerBuilder
impl Freeze for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnsafeUnpin for ServerBuilder
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