Vidyalelo
JavaScript · Q7

Sockets

Programming · JavaScript · question 7

Q7

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

A.
subprotocol property
B.
protocol property
Answer
C.
clientprotocol property
D.
none of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
Once the connection is established, the client can determine which subprotocol is in use by checking the protocol property of the socket.