Connection Manager

The library communicates with the server through a socket connection. It's able to use WebSockets or HTTP long polling as a last resort. The library handles the connection process on your behalf, you must implement the UI around connection states and reconnection handling.

LViS Connection Manager has events and methods to handle connection with LViS servers.

When LViS is trying to connect to the server it fires the STATE_CONNECTING event.

Once connection is successful the STATE_CONNECTED event is fired.

If the connection is unsuccessful, LViS automatically retries until it succeeds. On each attempt STATE_CONNECTING is triggered.