Skip to main content

Module webrtc

Module webrtc 

Source
Expand description

Transport-independent WebRTC answerer for webrtc.signal/1.

Carriers (node-app-iroh, node-app-p2p) implement WebRtcCarrier for ICE environment and session bookkeeping, then pass WebRtcAnswerer as the crate::WebRtcSignaling hook into crate::serve.

Structs§

ByteBudget
Shared byte budget for one WebRTC answerer session.
MappedSessionPort
A granted external mapping for one ICE session socket.
NoSessionPortMapper
Mapper that always refuses (host / STUN-only ICE).
NullWebRtcCarrier
Minimal carrier: no STUN, no portmap, system clock.
StaticWebRtcCarrier
Carrier with fixed STUN servers and an optional port mapper (tests / simple hosts).
WebRtcAnswerer
Shared WebRTC answerer implementing WebRtcSignaling.
WebRtcHandle
Synchronous teardown seam used by revalidation, replacement and shutdown.

Enums§

MapRefusal
Why a mapping request failed.

Constants§

SESSION_BYTES
Soft cap on in-flight session bytes (DC queues + HTTP request decode).

Traits§

SessionPortMapper
Carrier-owned UDP session port mapper (UPnP, relay map, etc.).
WebRtcCarrier
What a carrier must supply to run the shared WebRTC answerer.

Functions§

serve
Run on the app’s existing tokio runtime, never on its capability courier. stun contains advertised public-member STUN socket addresses (no TURN).