Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yamux: add error codes on stream reset #622

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions yamux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ Both Ping and Go Away messages should always use the 0 StreamID.
The meaning of the length field depends on the message type:

* Data - provides the length of bytes following the header
* Window update - provides a delta update to the window size
* Window update:
* If RST flag is not set:
* Provides a delta update to the window size
* If RST flag is set:
* Contains an error code
* Ping - Contains an opaque value, echoed back
* Go Away - Contains an error code

Expand Down Expand Up @@ -128,7 +132,7 @@ This does a half-close indicating the sender will send no further data.

Once both sides have closed the connection, the stream is closed.

Alternatively, if an error occurs, the RST flag can be used to hard close a stream immediately.
Alternatively, if an error occurs, the RST flag can be used to hard close a stream immediately. To provide an error code with the reset, use a window update frame with the RST flag set and set the Length field to the error code.

#### Flow Control

Expand Down