pub struct ServiceConfig {
pub backend_timeout: Duration,
pub frame_stats_capacity: usize,
pub max_clients: usize,
pub backend_queue_depth: usize,
pub require_token: bool,
}Expand description
Tuning knobs. ServiceConfig::default is what Service::start uses;
Service::start_with_config exists for tests and for a shell with an
unusual budget.
Fields§
§backend_timeout: DurationHow long a single backend call may take before the waiting client is
answered with an error instead. This is the promise that a wedged UI
thread costs a client an error, never a hang — see crate::hop’s
blocking model.
frame_stats_capacity: usizePer-client frame-stats queue depth (drop-oldest beyond it).
max_clients: usizeSimultaneous clients; further connections are closed immediately.
backend_queue_depth: usizeHow many backend calls may queue ahead of the one in flight.
require_token: boolWhether a client must present this process’s token at handshake
before any other method is dispatched. Default true, and a shell
should leave it that way: loopback is not a trust boundary on a
device, where any co-resident app can reach the port (see
crate::token’s module doc). Switching it off is for an in-process
test or a host with a stronger boundary of its own, never for a shipped
build.