콘텐츠로 이동
한국어

WebsocketListeners

이 콘텐츠는 아직 번역되지 않았습니다.

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