CIRCNetwork.delayedConnect Member

Trigger an onDoConnect event after a delay.

Syntax

object.delayedConnect(eventProperties);

Arguments

ArgumentSummary
eventProperties

Returns

Remarks

See Also

Source Code

function net_delayedConnect(eventProperties)
{
function reconnectFn(network, eventProperties)
{
network.immediateConnect(eventProperties);
};
if ((-1 != this.MAX_CONNECT_ATTEMPTS) &&
(this.connectAttempt >= this.MAX_CONNECT_ATTEMPTS))
{
this.state = NET_OFFLINE;
var ev = new CEvent("network", "error", this, "onError");
ev.debug = "Connection attempts exhausted, giving up.";
ev.errorCode = JSIRC_ERR_EXHAUSTED;
this.eventPump.addEvent(ev);
return;
}
this.state = NET_WAITING;
this.reconnectTimer = setTimeout(reconnectFn,
this.getReconnectDelayMs(),
this,
eventProperties);
}