pub struct IrohMoqProtocolHandler { /* private fields */ }Expand description
iroh ProtocolHandler for the moql ALPN. Each accepted connection is
wrapped as a web_transport_iroh::Session and handed to
moq_net::Server::accept, which performs the moq handshake and spawns
the session machinery.
Implementations§
Source§impl IrohMoqProtocolHandler
impl IrohMoqProtocolHandler
Sourcepub fn new() -> Self
pub fn new() -> Self
Build with a fresh origin pair (use Self::origin_producer to
publish broadcasts).
Sourcepub fn with_origin(origin: OriginShared) -> Self
pub fn with_origin(origin: OriginShared) -> Self
Build with a caller-supplied origin pair. Useful when one origin is shared across multiple substrates or with an existing service.
Sourcepub fn with_authz(self, authz: MoqAuthzConfig) -> Self
pub fn with_authz(self, authz: MoqAuthzConfig) -> Self
Install the #276 subscribe-authz + per-tenant announce-scoping config.
With an MoqlAdmissionAuthenticator in the config (#1027), the accept
path runs the inside-carrier challenge/response first and the admitted
peer’s tenant scope is served. Without one, no fresh-proof seam supplies
an authenticated PeerIdentity and the carrier NodeId alone never
reaches the resolver.
Query the installed ingress decision. This is intentionally the same decision the accept path uses when choosing its scoped writable origin. It keeps service-spawner wiring testable without exposing handler state.
Sourcepub fn with_connection_limit(self, connection_limit: usize) -> Self
pub fn with_connection_limit(self, connection_limit: usize) -> Self
Override the server-wide accepted-connection cap. Connections beyond the cap are dropped instead of waiting for admission.
Sourcepub fn with_event_authz(self, authz: Arc<dyn EventAuthz>) -> Self
pub fn with_event_authz(self, authz: Arc<dyn EventAuthz>) -> Self
Serve only the fixed Event namespace, with independent MAC decisions for each declared source and direction. No per-track callback is needed: the session never receives an origin outside its authorized sources.
Sourcepub fn origin(&self) -> &OriginShared
pub fn origin(&self) -> &OriginShared
Borrow the shared origin pair.
Sourcepub fn origin_producer(&self) -> &OriginProducer
pub fn origin_producer(&self) -> &OriginProducer
Borrow the producer (for in-process publishing).
Sourcepub fn origin_consumer(&self) -> &OriginConsumer
pub fn origin_consumer(&self) -> &OriginConsumer
Borrow the consumer (for in-process subscribing — same data as a remote subscriber sees on the wire).
Trait Implementations§
Source§impl Clone for IrohMoqProtocolHandler
impl Clone for IrohMoqProtocolHandler
Source§fn clone(&self) -> IrohMoqProtocolHandler
fn clone(&self) -> IrohMoqProtocolHandler
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IrohMoqProtocolHandler
impl Debug for IrohMoqProtocolHandler
Source§impl Default for IrohMoqProtocolHandler
impl Default for IrohMoqProtocolHandler
Auto Trait Implementations§
impl Freeze for IrohMoqProtocolHandler
impl !RefUnwindSafe for IrohMoqProtocolHandler
impl Send for IrohMoqProtocolHandler
impl Sync for IrohMoqProtocolHandler
impl Unpin for IrohMoqProtocolHandler
impl UnsafeUnpin for IrohMoqProtocolHandler
impl !UnwindSafe for IrohMoqProtocolHandler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<P> DynProtocolHandler for Pwhere
P: ProtocolHandler,
impl<P> DynProtocolHandler for Pwhere
P: ProtocolHandler,
§fn accept(
&self,
connection: Connection,
) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>
fn accept( &self, connection: Connection, ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>
ProtocolHandler::accept].§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more