At a low level, how does the Websocket protocol detect the status of a connection?

Viewed 1350

I was discussing Websocket overhead with a fellow engineer and we were both uncertain of how a Websocket actually detects the status of a client connection.

  1. Is there a "status" packet sent to the client/server periodically?
  2. Does it have anything to do with ping or pong in the low level API?
  3. What about frames?
  4. How does the Websocket detect that it's disconnected on the client? the server?

I'm surprised I couldn't find this answered on SO, but that may be my mistake. I found this answer addresses scalability, but that's not what I'm asking here. This answer touches on implementation, but not at the depth I'm pursuing here.

1 Answers
Related