In more detail
A WebSocket starts as an ordinary HTTP request that asks to "upgrade" (status 101 Switching Protocols). After that, data flows both ways with very little overhead, which suits chat, live prices, collaborative editing and games. URLs begin with ws:// or, encrypted, wss://.