Skip to main content

Module bridge

Module bridge 

Source
Expand description

Messages of the WebSocket bridge between the browser shim and the server (PRD section 11.2). One JSON message per frame; byte payloads are base64.

Every message has v: 1, a type, and optionally an id. A client message with an id is answered with ack (replyTo = that id) or error.

Structs§

ClientFrame
A message from the shim to the server.
SerialSignals
Output signals from SerialPort.setSignals(); only the ones the app set are present.
ServerFrame
A message from the server to the shim.

Enums§

BridgeErrorCode
Error codes in bridge error messages. The shim maps them to DOMException names.
ClientMessage
The body of a ClientFrame.
ServerMessage
The body of a ServerFrame.

Constants§

BRIDGE_VERSION
The protocol version in every message’s v.