pub struct Request { /* private fields */ }Expand description
An incoming MoQ session that can be accepted or rejected.
Self::with_publish and Self::with_consume will configure what will be published and consumed from the session respectively. Otherwise, the Server’s configuration is used by default.
Implementations§
Source§impl Request
impl Request
Sourcepub async fn close(self, _code: u16) -> Result<()>
pub async fn close(self, _code: u16) -> Result<()>
Reject the session, returning your favorite HTTP status code.
Sourcepub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
pub fn with_publish(self, publish: impl Into<Option<OriginConsumer>>) -> Self
Publish the given origin to the session.
Sourcepub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
pub fn with_consume(self, consume: impl Into<Option<OriginProducer>>) -> Self
Consume the given origin from the session.
Sourcepub fn with_stats(self, stats: StatsHandle) -> Self
pub fn with_stats(self, stats: StatsHandle) -> Self
Attach a tier-scoped moq_net::StatsHandle to this session.
Sourcepub async fn ok(self) -> Result<Session>
pub async fn ok(self) -> Result<Session>
Accept the session, performing rest of the MoQ handshake.
Sourcepub fn transport(&self) -> &'static str
pub fn transport(&self) -> &'static str
Returns the transport type as a string (e.g. “quic”, “iroh”).
Sourcepub fn has_peer_certificate(&self) -> bool
pub fn has_peer_certificate(&self) -> bool
Whether the peer presented a client certificate during the handshake
that chained to a configured ServerTlsConfig::root.
Only the Quinn backend supports mTLS; other backends always return false.