A state that represents if a WebSocket is connected.
WebSocket.CONNECTING
is0
, the connection is pending.WebSocket.OPEN
is1
, the connection is established andsend()
is possible.WebSocket.CLOSING
is2
, the connection is closing.WebSocket.CLOSED
is3
, the connection is closed or couldn't be opened.