What does the value 2 of the WebSocket attribute Socket.readyState indicate?
A.Closed connection
B.Handshake connection
C.Unestablished connection
D.Established connection and communication is possible
Answers
Answered by
1
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.
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.
Similar questions
Math,
7 months ago
Hindi,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
English,
1 year ago
Math,
1 year ago