OnMessage
OnMessage():
MethodDecorator
Defined in: src/decorators/websocket.ts:128
Decorator for raw message handler. Called for every message before event parsing/routing.
Returns
Section titled “Returns”MethodDecorator
Example
Section titled “Example”@OnMessage()handleMessage(ctx: ShokupanContext, ws: WebSocket, msg: string) { console.log("Received:", msg);}