Skip to content

Instantly share code, notes, and snippets.

@p3t0r
Created January 8, 2009 10:21
Show Gist options
  • Save p3t0r/44674 to your computer and use it in GitHub Desktop.
Save p3t0r/44674 to your computer and use it in GitHub Desktop.
private function connectRTMP():Boolean
{
// setup timeout
connectionTimer.reset();
connectionTimer.start();
tryNC = [];
tryNCTimer = new Timer(DEFAULT_NC_TIMEOUT);
tryNCTimer.addEventListener(TimerEvent.TIMER, nextConnect);
for (var i:uint = 0; i < RTMP_CONN.length; i++)
{
tryNC[i] = new NetConnection();
tryNC[i].objectEncoding = ObjectEncoding.AMF0;
tryNC[i].client = new NCManagerConnectClient(tryNC[i], this, i);
tryNC[i].addEventListener(NetStatusEvent.NET_STATUS, connectOnStatus);
}
nextConnect(null);
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment