pub struct OwpConfig {Show 17 fields
pub bind: SocketAddr,
pub server_id: String,
pub system_label: String,
pub schema: Option<String>,
pub system_uuid: String,
pub unwrap_ma_payloads: bool,
pub xml_baseline: bool,
pub max_frame_size: usize,
pub max_connections: usize,
pub max_subscriptions: usize,
pub init_timeout: Option<Duration>,
pub idle_timeout: Option<Duration>,
pub allowed_origins: Vec<String>,
pub validate: Mode,
pub on_panic: OnPanic,
pub reconnect: bool,
pub reconnect_delay: Duration,
}Expand description
Settings for one OWP listener.
Self::schema is the INIT protocol version, not a UCI catalog.
Self::system_uuid is minted per process by the host, not read
from TOML.
Fields§
§bind: SocketAddrAddress already resolved by the host.
server_id: StringServer identity sent on INFO.
system_label: StringHuman-readable label sent on INFO.
schema: Option<String>When set, INIT.schema must match exactly. None skips the check.
system_uuid: StringSystem UUID sent on INFO. Generated per process, not configured.
unwrap_ma_payloads: boolPeel A-GRA Rx/Tx hex wrappers on PUB and fan out wrapper + inner.
xml_baseline: boolConvert OMS JSON ↔ UCI XML at the socket. Engine / ASB see XML.
max_frame_size: usizeLargest frame accepted from a client. Oversized frames end the session.
max_connections: usizeConnections served at once. Further ones are closed on accept.
max_subscriptions: usizeSubscriptions one connection may hold.
init_timeout: Option<Duration>Deadline from an accepted WebSocket to a successful INIT. None
disables it. Measured from the handshake, not reset by traffic: a
peer that connects and never INITs is closed when this elapses.
idle_timeout: Option<Duration>Longest gap with no frame in either direction on an active session.
None disables it. Any client frame and any server frame resets it,
so an active publisher or subscriber is never closed for being idle.
allowed_origins: Vec<String>Exact Origin header values accepted at the WebSocket handshake.
Empty (the default) accepts any origin, including none, which is the
behavior before this list existed. When non-empty, a handshake whose
Origin is not listed verbatim is refused with 403.
validate: ModeWhat to do about a payload that does not follow the loaded schema. Has no effect without one: there is nothing to check against.
on_panic: OnPanicPanic in the accept loop: abort run, or treat it as a failed
session.
reconnect: boolRebind and accept again after the accept loop ends or panics.
reconnect_delay: DurationSleep between rebind attempts.