@appport/transport-websocket
v1.0.1
Published
WebSocket AppPort transport.
Readme
@appport/transport-websocket
The WebSocket transport.
import { createWebSocketTransport } from "@appport/transport-websocket";
const transport = createWebSocketTransport({
url: "wss://example.com/appport/ws",
sessionId
});Every WebSocket message contains exactly one AppPort envelope. The socket is the carrier; it defines no application semantics of its own.
Uses the platform WebSocket global by default; pass WebSocket explicitly to
supply another implementation. close() followed by connect() is a supported
cycle — a close event from a superseded socket never disturbs the new one.
The server half is @appport/server/node, whose RFC 6455 endpoint has no
runtime dependencies.
