Protocols
WebSocket
WebSocket provides a persistent full-duplex message channel between two peers.
How it works
After an HTTP upgrade, either side can send frames without opening a new request. Applications must define message semantics and reconnection behavior.
A concrete example
Illustrative: one connection carries 200 token events and 4 control messages.
Do not confuse it with Server-sent events
WebSocket is bidirectional; SSE streams only from server to client.