createWsBridge — WebSocket transport plugin with reconnect and message queuing.
Commands are sent as JSON frames over a persistent WebSocket connection. Pending messages are queued during disconnects and flushed on reconnect.
Reactive connection state — bindable in Vapor/VDOM templates without polling.
const bus = createAsyncCommandBus()const ws = createWsBridge({ url: 'wss://api.example.com/vc' })bus.use(ws)ws.connect() Copy
const bus = createAsyncCommandBus()const ws = createWsBridge({ url: 'wss://api.example.com/vc' })bus.use(ws)ws.connect()
createWsBridge — WebSocket transport plugin with reconnect and message queuing.
Commands are sent as JSON frames over a persistent WebSocket connection. Pending messages are queued during disconnects and flushed on reconnect.