v154 · websocket options

Subprotocol negotiation

Six real handshakes against the same endpoint, each offering a different set. The rule that surprises people is in row three: the client's order is a list of what it can speak, not a ranking — the server picks, and it picks by its own preference.

Six offers, one server

The endpoint knows echo.v2, echo, chat and soap, in that preference order. Every row opens a genuine connection and reports the server's own account of what it saw.

Offer, outcome, and what the server did with it
what the client offeredopened?negotiatedexpectedas expected?
Not run yet.
Press the button.

the rules, as exercised above

see also