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:

{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 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #