A state that represents if a WebSocket is connected.
WebSocket.CONNECTINGis0, the connection is pending.WebSocket.OPENis1, the connection is established andsend()is possible.WebSocket.CLOSINGis2, the connection is closing.WebSocket.CLOSEDis3, the connection is closed or couldn't be opened.