Module

x/hono/helper/websocket/index.ts>WSEvents

Fast, Lightweight, Web-standards
Very Popular
Go to Latest
interface WSEvents
import { type WSEvents } from "https://dotland.deno.dev/x/hono@v4.2.2/helper/websocket/index.ts";

WebSocket Event Listeners type

Properties

optional
onOpen: (evt: Event, ws: WSContext) => void
optional
onMessage: (evt: MessageEvent<WSMessageReceive>, ws: WSContext) => void
optional
onClose: (evt: CloseEvent, ws: WSContext) => void
optional
onError: (evt: Event, ws: WSContext) => void