Skip to content

Websocket connection timeout

Since build it is possible to set Websocket connection establishing timeout while session creation. To do this, timeout  parameter in milliseconds should be passed to createSession function:

var url = "wss://";
var tm = 1000;

Flashphoner.createSession({urlServer: url, timeout: tm}).on(SESSION_STATUS.ESTABLISHED, function (session) {

In server does not respond in this time, client will receive the SESSION_STATUS.FAILED event.