import { TpyWs } from "https://deno.land/x/tpy@v1.0.0-RC/src/ws.ts";
Adds an event listener to WebSocket events.
Parameters
callback: (data: Event) => void
A callback function to invoke when this event is fired.
Adds an event listener to WebSocket events.
Parameters
callback: (data: CloseEvent) => void
A callback function to invoke when this event is fired.
Adds an event listener to WebSocket events.
Parameters
callback: (data: ErrorEvent | Event) => void
A callback function to invoke when this event is fired.
Notice!
This event is fired every time the WebSocket is closed. This is an action of the Pylon backend marking closed connections as errors.