Connect States

<String> LViS.ConnectionManager.STATE_DISCONNECTED
<String> LViS.ConnectionManager.STATE_CONNECTING
<String> LViS.ConnectionManager.STATE_CONNECTED

Set of constants used for state representation.

STATE_DISCONNECTED

Is fired when connection was forcedly disconnected by calling LViS.ConnectionManager.disconnect() method.

STATE_CONNECTING

Is fired each time when manager tries to connect.

STATE_CONNECTED

Notifies that LViS successfully connected to the server. The handler is passed a server time as UNIX time in seconds.

Example

// shorthand
var Connect = LViS.ConnectionManager;
Connect.bind(Connect.ON_STATE, function () {
var state = arguments[0];
switch (state) {
case Connect.STATE_DISCONNECTED:
break;
case Connect.STATE_CONNECTING:
break;
case Connect.STATE_CONNECTED:
break;
}
});