Web Socket Instances

The WebSocket object instance has, similar to XHR, a readyState property, which lets you examine the state of the connection. It can have the following constant values:

MethodValueDescription
{worker}.CONNECTINGnumeric value 0connection has not yet been established
{worker}.OPENnumeric value 1connection is open and communication is possible
{worker}.CLOSINGnumeric value 2connection is being closed
{worker}.CLOSEDnumeric value 3connection is closed (or was never opened successfully)
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 # # # # #