clientNegotiation

abstract fun clientNegotiation(negotiatedProtocols: List<WebSocketExtensionHeader>): Boolean

This method is called only for the client, when it receives the WebSocket upgrade response.

Return

true if the extension should be used by the client.

Parameters

negotiatedProtocols

contains list of negotiated extensions from the server (can be empty).

It's up to extension to decide if it should be used or not.