How does a websocket know the server was taken down?

Viewed 1040

I was playing with websocket a bit (using Sails.js with its built-in socket thing, which is based on Socket.io).

I noticed Chrome receives two frames every 25 seconds. I thought this was some kind of polling to tell the connection was still on.

But then, I cancelled the server and Chrome was notified immediately.

Also I closed the Node process by force with the kill command, and still Chrome was notified, so that means it wasn't Node sending a signal before shutting down the server.

How does this happen?

1 Answers
Related