Visual RFC.
ALL RFCs / RFC 8441
Read the RFC ↗
RFC 8441 / WEBSOCKETS ON HTTP/2

Close one stream, keep the connection

04

A WebSocket uses one HTTP/2 stream, while other streams can carry HTTP traffic or other WebSockets.

RFC 8441 · § 5EXAMPLE
3 / 3
Close one stream, keep the connectionOne HTTP/2 TCP connection carries stream1HTTP, stream3WebSocket and stream5WebSocket. An orderly stream3 example exchanges WebSocket Close then END_STREAM in each direction, leaving siblings available. A separate abrupt example uses RST_STREAM(CANCEL) on stream3 only. Logical streams still share TCP and connection flow control.One stream closes; sibling streams remainAlternative abrupt exceptionStream 1HTTPStill availableStream 3RST_STREAM · CANCELStream 3 terminatedStream 5WebSocketStill availableShared TCP and connection flow control still applyWebSocket FIN ≠ HTTP/2 END_STREAM
03
Reset only the affected stream.

Separate abrupt-close example: RST_STREAM(CANCEL) ends WebSocket stream 3. The diagram preserves the other stream lanes and the shared TCP connection.

Source for this drawing: RFC 8441 · Read RFC section 5 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Terms in this drawing
END_STREAM
An HTTP/2 flag ending the sender’s direction of a stream.
RST_STREAM
An HTTP/2 frame terminating an individual stream.
CANCEL
The HTTP/2 error code used here for the reset exception.
Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

A WebSocket stream is not the shared TCP connection.

  • Other HTTP/2 streams can carry regular exchanges or additional Extended CONNECT tunnels on the same connection.
  • An orderly underlying closure is represented by END_STREAM. One direction finishing is a half-close; both directions finishing closes the stream. WebSocket Close control frames still have their own role.
  • RFC8441 maps an abrupt reset exception to RST_STREAM with CANCEL. Closing or resetting this WebSocket stream does not by itself close the other streams or the shared connection.
DETAILS

The middle state assumes both peers finish the WebSocket Close exchange before orderly end-of-stream in each direction. The last state is an alternative abrupt exception, not a reset after that clean close. Stream IDs1/3/5 are illustrative. Separate logical streams still share TCP delivery and connection-level flow control; no independent bandwidth or immunity to TCP head-of-line blocking is promised.

Read the RFC section ↗

All chapters in RFC 8441

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗