pub struct WebRtcDirectConfig {Show 14 fields
pub enabled: bool,
pub bind: SocketAddr,
pub advertised_addr: Option<SocketAddr>,
pub certificate_path: Option<PathBuf>,
pub max_connections: usize,
pub max_connections_per_ip: usize,
pub max_channels_per_connection: usize,
pub max_channels: usize,
pub max_concurrent_requests: usize,
pub max_requests_per_second: usize,
pub max_requests_per_second_per_ip: usize,
pub max_requests_per_second_per_connection: usize,
pub max_in_flight_bytes: usize,
pub max_in_flight_bytes_per_ip: usize,
}Expand description
Configuration for the ADR-0015 WebRTC Direct browser listener.
This listener is deliberately separate from the native Saorsa QUIC port. It exposes local closest-node lookup, immutable chunk reads, and paid content-addressed writes through the ordinary payment verifier.
Fields§
§enabled: boolEnable the browser listener.
bind: SocketAddrUDP address for the WebRTC Direct listener. Port zero asks the OS to choose.
advertised_addr: Option<SocketAddr>Literal public UDP address advertised to browsers.
When omitted, a wildcard listener uses the native self-address view’s first non-relay IP in the bind family and the actual WebRTC bound port. Publication waits when native address discovery has no usable IP.
certificate_path: Option<PathBuf>PEM file used to persist the stable DTLS certificate and private key.
Relative paths are resolved against the node root directory by the
caller. The default is webrtc-direct.pem beside the node identity.
max_connections: usizeMaximum simultaneously accepted browser sessions.
max_connections_per_ip: usizeMaximum simultaneously accepted browser sessions from one IPv4 address or IPv6 /64.
This must be lower than Self::max_connections so one public source
cannot occupy every listener slot.
max_channels_per_connection: usizeMaximum simultaneously active DataChannels on one browser session.
max_channels: usizeMaximum simultaneously active DataChannels across the listener.
Every admitted channel owns one handler task, so this is also the hard global channel-task bound.
max_concurrent_requests: usizeMaximum requests being read or processed across the listener.
max_requests_per_second: usizeToken-bucket request rate across the listener, in requests per second.
max_requests_per_second_per_ip: usizeToken-bucket request rate for one IPv4 address or IPv6 /64, in requests per second.
max_requests_per_second_per_connection: usizeToken-bucket request rate for one browser session, in requests per second.
max_in_flight_bytes: usizeMaximum bytes reserved by frames being assembled, decrypted, or sent across the listener.
max_in_flight_bytes_per_ip: usizeMaximum in-flight frame bytes attributable to one IPv4 address or IPv6 /64.
Trait Implementations§
Source§impl Clone for WebRtcDirectConfig
impl Clone for WebRtcDirectConfig
Source§impl Debug for WebRtcDirectConfig
impl Debug for WebRtcDirectConfig
Source§impl Default for WebRtcDirectConfig
impl Default for WebRtcDirectConfig
Source§impl<'de> Deserialize<'de> for WebRtcDirectConfigwhere
WebRtcDirectConfig: Default,
impl<'de> Deserialize<'de> for WebRtcDirectConfigwhere
WebRtcDirectConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for WebRtcDirectConfig
impl RefUnwindSafe for WebRtcDirectConfig
impl Send for WebRtcDirectConfig
impl Sync for WebRtcDirectConfig
impl Unpin for WebRtcDirectConfig
impl UnsafeUnpin for WebRtcDirectConfig
impl UnwindSafe for WebRtcDirectConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<'de, T> BorrowedRpcObject<'de> for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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