Yueyoum
Yueyoum

Reputation: 3073

Websocket frame, TCP segment: the relationship?

Websocket is high level protocol based on TCP.

Websocket has its own frame https://www.rfc-editor.org/rfc/rfc6455#section-5.2

TCP also has its own segment: http://en.wikipedia.org/wiki/Transmission_Control_Protocol

So, when using Websocket, send data:

  1. First, the data is wrapped in Websocket frame,
  2. then, the frame is packed in TCP segments,
  3. finally, send the TCP segments out.

Am I right?

Upvotes: 0

Views: 392

Answers (1)

user207421
user207421

Reputation: 310850

You are correct. You could have added

  • the TCP segment is wrapped in an IP packet
  • send the IP packet out

Upvotes: 1

Related Questions