# createWSContext

**Kind:** Function

**Source:** [`src/adapter/bun/websocket.ts`](https://github.com/honojs/hono/blob/main/src/adapter/bun/websocket.ts#L33)

**Part of:** [Adapter](subsystem-src-adapter)

## Signature

```ts
function createWSContext(ws: BunServerWebSocket<BunWebSocketData>): WSContext
```

## Parameters

| Name | Type |
|---|---|
| `ws` | `BunServerWebSocket<BunWebSocketData>` |

**Returns:** `WSContext`
