Closing the connection
06Close frames coordinate shutdown before the underlying TCP connection is closed.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
DIAGRAM§ 7.1 ↗
RFC 6455 · § 7.1EXAMPLE
3 / 3
03
Release the underlying connection.
Both endpoints have sent and received Close; transport shutdown completes the connection lifecycle.
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
Read the updated RFC section ↗
Distinguish an orderly close from a broken connection.
- After sending a Close frame, an endpoint must not send more data frames.
- An endpoint receiving Close sends a Close response if it has not already sent one; after both directions complete, close TCP.
- Close codes 1005 and 1006 are reserved for local reporting and must not appear in a transmitted Close frame.
A Close body, if present, starts with a two-byte status code and may include a UTF-8 reason. Invalid UTF-8 requires connection failure. After abnormal closure, randomized and increasing reconnect delays help avoid a retry storm.
Read the RFC section ↗Diagrams simplify the RFC. Read the linked sections for complete requirements.
Privacy