createWsClientTransport
The createWsClientTransport function wraps a WebSocket in a WsClientTransport implementation.
createWsClientTransport<WebSocketType>(options: WsClientTransportOptions<WebSocketType>): WsClientTransport<WebSocketType>| Type | Description | |
|---|---|---|
options | WsClientTransportOptions<WebSocketType> |
|
| returns | WsClientTransport<WebSocketType> | A |
This transport enables real-time synchronization over network connections, allowing Synclets to communicate across different machines, processes, or browser tabs. It handles automatic reconnection, packet fragmentation for large payloads, and bidirectional communication.
The client transport can only connect to servers created with a 'server' synclet running WsBrokerTransport or similar. It is suitable for browser environments (using the Web API WebSocket) and Node.js (using the 'ws' package).
Since
v0.0.0