pub struct WebSocketConfig {Show 16 fields
pub bind_addr: Option<String>,
pub public_url: Option<String>,
pub seed_urls: Vec<String>,
pub path: Option<String>,
pub mtu: Option<u16>,
pub max_frame_bytes: Option<usize>,
pub max_send_queue: Option<usize>,
pub max_connections: Option<usize>,
pub max_inbound_connections: Option<usize>,
pub connect_timeout_ms: Option<u64>,
pub key_hint_timeout_ms: Option<u64>,
pub reconnect_initial_ms: Option<u64>,
pub reconnect_max_ms: Option<u64>,
pub ping_interval_secs: Option<u64>,
pub idle_timeout_secs: Option<u64>,
pub accept_connections: Option<bool>,
}Expand description
WebSocket physical transport configuration.
The native listener intentionally speaks plain WebSocket so deployments can
bind it to localhost or a private interface and terminate TLS in a reverse
proxy. Clients use explicit wss:// seed URLs; plaintext ws:// seeds are
accepted only for loopback development and tests. A bounded nonce/key-hint
exchange identifies a URL-only seed before Noise IK; after that exchange,
every binary WebSocket message carries exactly one bounded FIPS physical
record.
Fields§
§bind_addr: Option<String>Optional native plain-WS listener address. Unset means client-only.
public_url: Option<String>Public wss:// URL advertised for this listener, separate from bind.
seed_urls: Vec<String>One or more explicit first-adjacency seed URLs.
path: Option<String>HTTP path accepted by the native listener. Defaults to /fips.
mtu: Option<u16>Dataplane/path budget. Defaults to 1400 bytes.
max_frame_bytes: Option<usize>Maximum binary WebSocket message size.
max_send_queue: Option<usize>Maximum queued outbound records per connection.
max_connections: Option<usize>Maximum total WebSocket connections for this transport instance.
max_inbound_connections: Option<usize>Maximum simultaneous inbound WebSocket connections.
connect_timeout_ms: Option<u64>Outbound TCP/TLS/WebSocket connect timeout.
key_hint_timeout_ms: Option<u64>Time allowed for the untrusted seed-key hint exchange.
reconnect_initial_ms: Option<u64>Initial reconnect delay for configured seeds.
reconnect_max_ms: Option<u64>Maximum reconnect delay for configured seeds.
ping_interval_secs: Option<u64>WebSocket ping interval. Zero disables transport pings.
idle_timeout_secs: Option<u64>Close connections with no received frame for this long. Zero disables.
accept_connections: Option<bool>Accept fresh inbound Noise IK handshakes. Defaults to true whenever the transport has a listener or seed URL. WebSocket dial direction does not constrain FIPS session direction on an established routed adjacency.
Implementations§
Source§impl WebSocketConfig
impl WebSocketConfig
pub fn path(&self) -> &str
pub fn mtu(&self) -> u16
pub fn max_frame_bytes(&self) -> usize
pub fn max_send_queue(&self) -> usize
pub fn max_connections(&self) -> usize
pub fn max_inbound_connections(&self) -> usize
pub fn connect_timeout_ms(&self) -> u64
pub fn key_hint_timeout_ms(&self) -> u64
pub fn reconnect_initial_ms(&self) -> u64
pub fn reconnect_max_ms(&self) -> u64
pub fn ping_interval_secs(&self) -> u64
pub fn idle_timeout_secs(&self) -> u64
pub fn accept_connections(&self) -> bool
pub fn validate(&self) -> Result<(), String>
Trait Implementations§
Source§impl Clone for WebSocketConfig
impl Clone for WebSocketConfig
Source§fn clone(&self) -> WebSocketConfig
fn clone(&self) -> WebSocketConfig
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 WebSocketConfig
impl Debug for WebSocketConfig
Source§impl Default for WebSocketConfig
impl Default for WebSocketConfig
Source§fn default() -> WebSocketConfig
fn default() -> WebSocketConfig
Source§impl<'de> Deserialize<'de> for WebSocketConfig
impl<'de> Deserialize<'de> for WebSocketConfig
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>,
impl Eq for WebSocketConfig
Source§impl PartialEq for WebSocketConfig
impl PartialEq for WebSocketConfig
Source§impl Serialize for WebSocketConfig
impl Serialize for WebSocketConfig
impl StructuralPartialEq for WebSocketConfig
Auto Trait Implementations§
impl Freeze for WebSocketConfig
impl RefUnwindSafe for WebSocketConfig
impl Send for WebSocketConfig
impl Sync for WebSocketConfig
impl Unpin for WebSocketConfig
impl UnsafeUnpin for WebSocketConfig
impl UnwindSafe for WebSocketConfig
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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