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.
Methods
Section titled “Methods”onClose()
Section titled “onClose()”onClose(
code,reason):void
Defined in: src/http/websocket/SocketAdapter.ts:22
Parameters
Section titled “Parameters”number
reason
Section titled “reason”string
Returns
Section titled “Returns”void
onError()
Section titled “onError()”onError(
err):void
Defined in: src/http/websocket/SocketAdapter.ts:23
Parameters
Section titled “Parameters”Error
Returns
Section titled “Returns”void
onMessage()
Section titled “onMessage()”onMessage(
data):void
Defined in: src/http/websocket/SocketAdapter.ts:21
One inbound frame, already normalised to text (string) or binary (Uint8Array).
Parameters
Section titled “Parameters”string | Uint8Array<ArrayBufferLike>
Returns
Section titled “Returns”void
