The ready state of the client.
- if
0, the client is connecting. - if
1, the client is connected. - if
2, the client is closing. - if
3, the client is closed.
property
The ready state of the client.
0, the client is connecting.1, the client is connected.2, the client is closing.3, the client is closed.console.log(socket.readyState); // 1