WebSocketConnectionInfo
Connection metadata for the current WebSocket generation.
@defjs/core · Type
Signature
interface WebSocketConnectionInfo { extensions?: string; generation: number; protocol?: string; url?: string; }
-
urlis the URL the socket reports. -
protocolis the negotiated subprotocol andextensionsthe negotiated extensions. Both areundefinedwhen the socket reports an empty string. -
generationcounts the physical sockets that reachedopen:1after the first open, one more after each reconnect. A snapshot taken before any open has0.
session.connection exposes the session's current public connection info. The connection in the operation result preserves the first successful snapshot only for a native Defjs session or a wrapper forwarding the same live connection object. Custom sessions and wrappers that transform connection instead return their current public connection. Sharing closed cannot bypass URL sanitization or metadata filtering, and Defjs does not reconstruct first-connection metadata from arbitrary transformations.
Members
Prop
Type
extensions? string | undefinedgeneration numberprotocol? string | undefinedurl? string | undefined