ReadonlydataPer-connection application state, the socket-lifetime analogue of
IRequestContext.state. Use it to attach an authenticated user
id, a tenant, or any value later handlers and broadcasts need.
ReadonlyidUnique connection ID (from runtime.uuid()).
ReadonlyisWhether the connection is still writable.
ReadonlypathThe path this connection was opened on.
ReadonlyreadyCurrent lifecycle state.
Closes the connection. Idempotent.
Optionalcode: number
RFC 6455 close code (defaults to 1000)
Optionalreason: string
Human-readable close reason
Serializes a value to JSON and sends it as a text frame.
The payload type
The value to serialize
A live WebSocket connection, as seen by application code.
Since
0.2.0