pub struct Listener {
endpoint: Endpoint,
}Expand description
A transport-agnostic MoQT listener that accepts both raw-QUIC and WebTransport clients on the same UDP port.
Fields§
§endpoint: EndpointImplementations§
Source§impl Listener
impl Listener
Sourcepub fn bind(config: ListenerConfig) -> Result<Self, ProxyError>
pub fn bind(config: ListenerConfig) -> Result<Self, ProxyError>
Bind to the configured address and start listening.
The listener advertises every supported MoQT ALPN (moq-00 and
moqt-<N> for all known drafts) plus h3 for WebTransport. The
client picks which one to speak; the proxy forwards whatever
arrives.
Sourcepub async fn accept(&self) -> Result<AcceptedConn, ProxyError>
pub async fn accept(&self) -> Result<AcceptedConn, ProxyError>
Accept the next incoming connection and dispatch based on the ALPN negotiated during the TLS handshake.
Raw-QUIC connections are returned immediately with the negotiated
ALPN so the caller can pick the MoQT draft. For h3 clients the
listener drives the HTTP/3 + extended-CONNECT handshake to
completion before returning a ready wtransport::Connection.
Sourcepub fn local_addr(&self) -> Result<SocketAddr, ProxyError>
pub fn local_addr(&self) -> Result<SocketAddr, ProxyError>
Get the local address this listener is bound to.
Auto Trait Implementations§
impl Freeze for Listener
impl !RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin for Listener
impl UnsafeUnpin for Listener
impl !UnwindSafe for Listener
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