# stream

**Kind:** Function

**Source:** [`src/helper/streaming/stream.ts`](https://github.com/honojs/hono/blob/main/src/helper/streaming/stream.ts#L7)

**Part of:** [Helper](subsystem-src-helper)

## Signature

```ts
function stream(c: Context, cb: (stream: StreamingApi) => Promise<void>, onError: (e: Error, stream: StreamingApi) => Promise<void>): Response
```

## Parameters

| Name | Type |
|---|---|
| `c` | `Context` |
| `cb` | `(stream: StreamingApi) => Promise<void>` |
| `onError` | `(e: Error, stream: StreamingApi) => Promise<void>` |

**Returns:** `Response`

## Relationships

- IMPORTS → `StreamingApi`
- IMPORTS → `isOldBunVersion`
