Skip to Content
Senri
API reference

/websocket

@senrijs/senri/websocket: WebSocket routes

WebSocket routes.

import { ... } from "@senrijs/senri/websocket";

Functions and classes

NameWhat it does
upgradeWebSocket(create, options?)Creates the handler of a WebSocket route
websocketThe 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

On this page