sigildocs

(sigil browser websocket)

(sigil browser websocket) - Raw browser WebSocket bridge facade

You probably want (sigil websocket) instead: it is the portable, documented WebSocket client (ws-connect, ws-send, ...) and wraps this bridge on WASM builds. This module is the raw platform backend with poll-based event semantics (websocket-receive drains an open/message/ close/error event queue), not the buffered message API.

The JavaScript bridge asset is advertised by package wasm-bridge: metadata. The WASM runtime exposes the %wasm-websocket-* primitives; this module keeps the Sigil-side import path stable.

Exports

Raw WebSocket readyState: 0=CONNECTING, 1=OPEN, 2=CLOSING, 3=CLOSED. websocket-open? only reports OPEN (true for readyState 1), which cannot distinguish a still-connecting socket from a closed one. This can.

#t while the socket is still in the async CONNECTING handshake (readyState 0). Distinct from open (1) and closed (2/3) so poll-based receivers don't mistake a slow-opening socket for a dead one.

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)

(No description)