1.

How can we check the subprotocol being used by the client?(a) subprotocol property(b) protocol property(c) clientprotocol property(d) client propertyI got this question during an online exam.My question is based upon Web Sockets topic in division Sockets of JavaScript

Answer»

The correct CHOICE is (b) protocol property

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.



Discussion

No Comment Found

Related InterviewSolutions