WebSocket

Websocket is stateful, it persist the connection between client and the server.

Pasted image 20230918093928.png

It's suitable for realtime data transfer and has low overhead because we only do handshake once.

Applications:

  • Multi-player games
  • Chat