Client-side yamux session over a byte-stream connection.
The connection must implement read(n) -> bytes, write(data) -> int,
and close() -> None. Typically this is a :class:_WSAdapter wrapping
a WebSocket.
Usage::
session = YamuxSession(conn)
stream = session.open_stream()
stream.write(b"hello")
data = stream.read(1024)
stream.close()
session.close()
YamuxSession(
self,
conn: _ReadWriteCloser,
)| Name | Type |
|---|---|
| conn | _ReadWriteCloser |