Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
interface WSEvents
import { type WSEvents } from "https://deno.land/x/hono@v4.2.1/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