Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/protocol / subprotocol / negotiateSubprotocol
Function: negotiateSubprotocol()
ts
function negotiateSubprotocol(clientList): string | null;Defined in: subprotocol.ts:87
Pick the single subprotocol the server should echo back. Returns SUBPROTOCOL_NAME when the client offered it, or null when no compatible variant was advertised. The function ignores ticket.* tokens — those are handled separately via parseTicketSubprotocol.
Parameters
| Parameter | Type |
|---|---|
clientList | string | readonly string[] |
Returns
string | null