Hi ive posted my connect helper subclass before, its really basic, it 
could really do with some cleaning up and iterate through other ports 
aswell.

private function parseURL(url:String):Array
        {
            return url.split("://")
        }
       
        private function getURL(url:String):String
        {
            return parseURL(url)[1];

        }

public function onStatus(event:NetStatusEvent):void
        {
            switch (event.info.code)
            {
                case "NetConnection.Connect.Success":
                    this.dispatchEvent(new 
ConnectEvent(ConnectEvent.CONNECTED,false,false,ConnectEvent.CONNECTED_MSG));
                    stopReconnect();
                break;
                case "NetConnection.Connect.Failed":
                    nextConnect();
                break;
                case "NetConnection.Connect.Closed":
                    this.dispatchEvent(new 
ConnectEvent(ConnectEvent.DISCONNECTED,false,false,ConnectEvent.DISCONNECTED_MSG));
                break;
            }
           
        }
       
        private function stopReconnect():void
        {
            clearTimeout(this.ncInt[0]);   
        }
       
        private function nextConnect():void
        {
            trace("Couldnt connect to " + this.uri);
            this.ncInt[0] = setTimeout(tryFallBack, 1500);
        }
       
        private function tryFallBack():void
        {
            if (connectRetry > 1)
            {   
                stopReconnect();
                this.dispatchEvent(new 
ConnectEvent(ConnectEvent.FAILED,false,false,ConnectEvent.FAILED_MSG));
            } else {
                this.dispatchEvent(new 
ConnectEvent(ConnectEvent.RECONNECTED,false,false,ConnectEvent.RECONNECTED_MSG));
               
                var url:String = getURL(this.uri);
                this.close();
                this.connect("rtmpt://" + url);
                connectRetry++;
            }
        }


Oliver Müller wrote:
> code snippet would be great. please post it.
> thanks,
> Olli
>
> 2007/2/14, Dan Rossi <[EMAIL PROTECTED]>:
>   
>> Oliver Müller wrote:
>>     
>>> Hi,
>>> what possibilities do I have to connect through a firewall to my red5 app ?
>>> I thought of switching to tunneling but had no success.
>>> Is the proxyType of the NetConnection the key ?
>>>
>>>       
>> rtmpt over port 80 ? It defaults to 8080 if you have to chage in your
>> application properties aswell as the main red5 properties aswell , the
>> flash 9 player is suppose to do fallbacks but it doesnt i have some
>> fallback code if needed.
>>
>> _______________________________________________
>> Red5 mailing list
>> [email protected]
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>     
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>   


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to