ExamVeda
Login
Home
This question belongs to Javascript Sockets
Sockets
?

What does the value 2 of the WebSocket attribute Socket.readyState indicate?

Answer & Solution
Correct Answer: Option B
The readonly attribute readyState represents the state of the connection. It can have the following values:
1. A value of 0 indicates that the connection has not yet been established.
2. A value of 1 indicates that the connection is established and communication is possible.
3. A value of 2 indicates that the connection is going through the closing handshake.
4. A value of 3 indicates that the connection has been closed or could not be opened.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.