Skip to content

WebSockets

  • WebSocketArc The WebSocket arc: the WebSocketBase authoring surface plus compilation and per-upgrade execution.
  • FlareWebSocketContext The connection a WebSocket handler holds: a lean, runtime-agnostic noun over the live socket.
  • socketContract Defines a typed WebSocket contract - the "ws" kind of the generic contract core, the WS sibling of httpContract.
  • WebSocketControllerBase Base class for a class-form WebSocket endpoint.
  • WebSocketChannels Framework service for publishing to WebSocket channels from OUTSIDE a connection: an HTTP handler, a timer, any code in the same broadcast domain.
  • WebSocketRouteHandle The build-time handle host.ws.route(path, opts) returns: attach the connection’s lifecycle behaviors with individual registrar calls, the same way host.http.get/post register behaviors (never an object literal).
  • WebSocketRefusal An upgrade hook’s accept-then-close verdict: the handshake completes, then the connection closes immediately with this code and reason, skipping the route’s channels and controller entirely.
  • FlareWebSocketContext The connection a WebSocket handler holds: a lean, runtime-agnostic noun over the live socket.
  • FlareWebSocketMessage Runtime-agnostic representation of a single WebSocket message.
  • WebSocketArc The WebSocket arc: the WebSocketBase authoring surface plus compilation and per-upgrade execution.
  • WebSocketChannels Framework service for publishing to WebSocket channels from OUTSIDE a connection: an HTTP handler, a timer, any code in the same broadcast domain.
  • WebSocketControllerBase Base class for a class-form WebSocket endpoint.
  • WebSocketControllerHandle The build-time handle host.ws.controller(path, cls) returns.
  • WebSocketRefusal An upgrade hook’s accept-then-close verdict: the handshake completes, then the connection closes immediately with this code and reason, skipping the route’s channels and controller entirely.
  • WebSocketRouteHandle The build-time handle host.ws.route(path, opts) returns: attach the connection’s lifecycle behaviors with individual registrar calls, the same way host.http.get/post register behaviors (never an object literal).
  • socketContract Defines a typed WebSocket contract - the "ws" kind of the generic contract core, the WS sibling of httpContract.
  • WebSocketCloseHandler close handler: runs at the terminal close.
  • WebSocketControllerClass A concrete WebSocket controller class: constructed once per connection with its container, socket, and input.
  • WebSocketDescriptor Static shape of one WebSocket route: inbound/outbound schemas and typed upgrade inputs.
  • WebSocketErrorHandler error handler: runs on a transport/protocol error; a terminal close still follows.
  • WebSocketHandlerScope The per-connection DI + config + input surface handed to a function-form WS handler as its second argument.
  • WebSocketIncoming The inbound message type a descriptor produces: the validated value when incoming is declared, otherwise a FlareWebSocketMessage (the rich wrapper - inspect .text()/.json()/.isBinary).
  • WebSocketInput The CONNECT-time typed input every WS handler’s scope.input carries (stable for the connection’s life): the upgrade path params and query.
  • WebSocketMessageHandler message handler: runs per inbound message; the payload is on scope.input.message.
  • WebSocketMessageHandlerScope The message handler’s scope: WebSocketHandlerScope whose input additionally carries the validated inbound message (typed from the descriptor’s incoming), mirroring HTTP’s scope.input.body.
  • WebSocketMessageInput The message handler’s scope.input: the connect-time input plus the validated inbound message.
  • WebSocketOpenHandler open handler: runs once when the connection reaches OPEN.
  • WebSocketOutgoing The outbound value type a descriptor accepts (raw wire type when no outgoing schema).
  • WebSocketRaw The raw WebSocket message wire types: text (string) or binary (Uint8Array).
  • WebSocketRouteOptions Per-route options for host.ws.route / host.ws.controller: loose inline fields OR a branded contract.
  • WebSocketsConfig Resolved shape of the websockets config section: the per-connection size caps and liveness timers.
  • WebSocketState Durable per-connection state: the store ws.state exposes.
  • WebSocketToken Branded WS contract entry for one route (e.g.
  • WebSocketUpgrade Read-only view of the HTTP request behind one WebSocket upgrade, handed to the upgrade hook.
  • WebSocketUpgradeHandler The upgrade hook: runs BEFORE the handshake completes, in request scope (no socket exists yet).
  • WebSocketUpgradeHandlerScope The upgrade hook’s scope: the WebSocketHandlerScope shape plus the pre-connection state writer.
  • WebSocketUpgradeOptions The options accepted by the two-arg upgrade registrar: the hook’s own DI map and state provisions.
  • WebSocketUpgradeResult What one upgrade hook run decides.
  • WEBSOCKETS_CONFIG Pre-defined token for Flare-internal WebSocket config (size caps and liveness timers).

Last updated: