Aller au contenu
Français

WebsocketListeners

Ce contenu n’est pas encore disponible dans votre langue.

Defined in: src/http/websocket/SocketAdapter.ts:19

Listeners the framework attaches to a socket. The backend adapter must guarantee that no inbound frame is delivered before WebsocketSocketAdapter.setListeners returns (attach natively in the same synchronous tick, or buffer until then) — this is what closes the “first frame lost” race by construction.

onClose(code, reason): void

Defined in: src/http/websocket/SocketAdapter.ts:22

number

string

void


onError(err): void

Defined in: src/http/websocket/SocketAdapter.ts:23

Error

void


onMessage(data): void

Defined in: src/http/websocket/SocketAdapter.ts:21

One inbound frame, already normalised to text (string) or binary (Uint8Array).

string | Uint8Array<ArrayBufferLike>

void