How can we check the subprotocol being used by the client?
How can we check the subprotocol being used by the client? Correct Answer protocol property
A WebSocket is a standard bidirectional TCP socket between the client and the server. The socket starts out as an HTTP connection and then “Upgrades” to a TCP socket after an HTTP handshake. Once the connection is established, the client can determine which subprotocol is in use by checking the protocol property of the socket.