# YamuxStream

> **Class** in `langsmith`

📖 [View in docs](https://reference.langchain.com/python/langsmith/sandbox/_yamux/YamuxStream)

A single multiplexed stream within a yamux session.

Streams are created via :meth:`YamuxSession.open_stream` and provide
blocking read/write/close with per-stream flow control.

## Signature

```python
YamuxStream(
    self,
    stream_id: int,
    session: YamuxSession,
)
```

## Constructors

```python
__init__(
    self,
    stream_id: int,
    session: YamuxSession,
) -> None
```

| Name | Type |
|------|------|
| `stream_id` | `int` |
| `session` | `YamuxSession` |


## Properties

- `stream_id`

## Methods

- [`read()`](https://reference.langchain.com/python/langsmith/sandbox/_yamux/YamuxStream/read)
- [`write()`](https://reference.langchain.com/python/langsmith/sandbox/_yamux/YamuxStream/write)
- [`close()`](https://reference.langchain.com/python/langsmith/sandbox/_yamux/YamuxStream/close)

---

[View source on GitHub](https://github.com/langchain-ai/langsmith-sdk/blob/19dc497a3d89638e4cc35db72ea1c29cad35cbbf/python/langsmith/sandbox/_yamux.py#L56)