FoundryEnvironment.WebSocketKeepAliveInterval Property

Definition

The WebSocket Ping/Pong keep-alive interval used by the invocations_ws protocol. Sourced from the WS_KEEPALIVE_INTERVAL environment variable (value in integer seconds). When absent, zero, or unparseable, returns InfiniteTimeSpan (disabled β€” Kestrel default of 30s does not apply because Core sets the option explicitly to honour the spec's "disabled by default" contract).

public static TimeSpan WebSocketKeepAliveInterval { get; }
static member WebSocketKeepAliveInterval : TimeSpan
Public Shared ReadOnly Property WebSocketKeepAliveInterval As TimeSpan

Property Value

Remarks

Wired into ASP.NET Core's WebSocketOptions.KeepAliveInterval so a positive value emits RFC 6455 protocol-level Ping frames (opcode 0x9) at the configured cadence. The Foundry hosting platform auto-injects this env var; configure it locally to test long-lived WS connections through upstream proxy / load-balancer idle timeouts.

Applies to