pub struct Server { /* private fields */ }Expand description
A WebTransport server that accepts new sessions.
Implementations§
Source§impl Server
impl Server
Sourcepub fn new(endpoint: Endpoint) -> Self
pub fn new(endpoint: Endpoint) -> Self
Manually create a new server with a preconfigured endpoint.
NOTE: The ALPN must be set to crate::ALPN for WebTransport to work.
Sourcepub fn local_addr(&self) -> Result<SocketAddr, Error>
pub fn local_addr(&self) -> Result<SocketAddr, Error>
Return the local address on which the server endpoint is listening.
Auto Trait Implementations§
impl !Freeze for Server
impl !RefUnwindSafe for Server
impl !Sync for Server
impl !UnwindSafe for Server
impl Send for Server
impl Unpin for Server
impl UnsafeUnpin for Server
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