Visual RFC.
ALL RFCs / RFC 6455
Read the RFC ↗
RFC 6455 / EXCHANGE MESSAGES

Messages in both directions

02

Once established, either endpoint can send a message without waiting for a new HTTP request.

RFC 6455 · § 1.2EXAMPLE
3 / 3
03
Choose a message type for the application.

Binary content is delivered as bytes; its meaning comes from the application or negotiated subprotocol.

Messages in both directionsA single established channel carries an independent client text message, server update, and binary message.One connection, independent messagesApplication message examplesClientServertext: helloUTF-8text: updatebinary message01100101Binary bytes have application-defined meaning

Key idea: Two independent directions share one connection.

Terms

Look up a term in the glossary ↗

Rules & examples
  • The base protocol carries text or binary messages over TCP.
  • Text messages must contain valid UTF-8 as a whole, even if split across frames.
  • WebSocket framing does not define your application message schema, delivery acknowledgments, or business-level replay behavior.

The illustration shows ordinary text messages. A TCP connection is an ordered byte stream; WebSocket provides message framing on top of it.

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

A request starts a conversation.

A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.

Helpful first, if these ideas are unfamiliar

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

Related RFCs and changes

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

All chapters in RFC 6455

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 ↗