pub struct Server { /* private fields */ }Expand description
Server for accepting MoQ connections over QUIC.
Create via ServerConfig::init or Server::new.
Implementations§
Source§impl Server
impl Server
pub fn new(config: ServerConfig) -> Result<Self>
pub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
pub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
pub fn tls_info(&self) -> Arc<RwLock<ServerTlsInfo>>
Sourcepub async fn accept(&mut self) -> Option<Request>
pub async fn accept(&mut self) -> Option<Request>
Returns the next partially established QUIC or WebTransport session.
This returns a Request instead of a web_transport_quinn::Session so the connection can be rejected early on an invalid path or missing auth.
The Request is either a WebTransport or a raw QUIC request. Call Request::accept or Request::reject to complete the handshake.
pub fn local_addr(&self) -> Result<SocketAddr>
pub fn close(&mut self)
Auto Trait Implementations§
impl !Freeze for Server
impl !RefUnwindSafe for Server
impl Send for Server
impl !Sync for Server
impl Unpin for Server
impl !UnwindSafe 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