How can we check the subprotocol being used by the client?

How can we check the subprotocol being used by the client?
A. subprotocol property
B. protocol property
C. clientprotocol property
D. client property
 
Answer: b
Explanation: 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.
 

Tìm kiếm

Back
Top