LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithsandbox_yamuxYamuxStream
Class●Since v0.7

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.

Copy
YamuxStream(
    self,
    stream_id: int,
    session: YamuxSession,
)

Constructors

constructor
__init__
NameType
stream_idint
sessionYamuxSession

Attributes

attribute
stream_id: int

Methods

method
read

Read up to n bytes, blocking until data is available.

Returns b"" on EOF (FIN received). Raises :class:ConnectionResetError on RST.

method
write

Write data, blocking if the send window is exhausted.

method
close

Close the stream (sends FIN to the remote end).

View source on GitHub