API reference
/websocket
@senrijs/senri/websocket: WebSocket routes
WebSocket routes.
import { ... } from "@senrijs/senri/websocket";Functions and classes
| Name | What it does |
|---|---|
upgradeWebSocket(create, options?) | Creates the handler of a WebSocket route |
websocket | The handlers to pass to Bun.serve |
Types
WebSocketEvents
Prop
Type
WSConnection
Prop
Type
UpgradeWebSocketOptions
Prop
Type
attachNodeSocket, NODE_UPGRADE and UPGRADE_MARKER are parts used by the Node.js adapter. Apps do not use them.
Source: src/websocket.ts