/Knowledge/sources/honojs__hono/llms-full/websocket-helper-rpc-mode--caf15516e840.md
WebSocket Helper: RPC-mode - hono-docs
WebSocket Helper: RPC mode Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt rpc mode Summary Handlers d...
WebSocket Helper: RPC-mode
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#rpc-mode
Summary
Handlers defined with WebSocket Helper support RPC mode. ```ts // server.ts const wsApp = app.get( '/ws', upgradeWebSocket((c) => { //... }) ) export type WebSocketApp = typeof wsApp // client.ts const client = hc ('http://localhost:8787...
Content
Handlers defined with WebSocket Helper support RPC mode.
// server.ts
const wsApp = app.get(
'/ws',
upgradeWebSocket((c) => {
//...
})
)
export type WebSocketApp = typeof wsApp
// client.ts
const client = hc<WebSocketApp>('http://localhost:8787')
const socket = client.ws.$ws() // A WebSocket object for a client
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#rpc-mode",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / WebSocket Helper > RPC-mode",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 709,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "WebSocket Helper: RPC-mode",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}