[]previous and next page

WsEvent

One thing a client sent.

One thing a client sent. A message is whole: fragments are joined.

Import#

ts
import type { WsEvent } from "@shadow-js/dusk/server";

Signature#

ts
type WsEvent =
  | { readonly kind: "text"; readonly data: Uint8Array }
  | { readonly kind: "binary"; readonly data: Uint8Array }
  | { readonly kind: "ping"; readonly data: Uint8Array }
  | { readonly kind: "pong"; readonly data: Uint8Array }
  | { readonly kind: "close"; readonly code: number; readonly reason: string }