Skip navigation
Currently Being Moderated

rtmftp connect succes, but peer to peer can not connect

Apr 8, 2012 6:59 PM

Tags: #air #rtmfp #cirrus #p2p #stratus



i have a truble in my adobe air application


some client in firewall when connect rtmfp:// it connect success and get peer ID ok


but  cannot peer to peer netstream connection



//in code

incomingStream = new NetStream(netConnection, remoteid);

incomingStream.addEventListener(NetStatusEvent.NET_STATUS, incomingStreamHandler);"media-callee");


it takes serveral minutes and get "NetStream.Connect.Closed" returns


how can i figure it?


i think if firewall blocked outgoing UDP then rtmfp connect should be blocked.

but it connect rtmfp:// success and peer to peer netstream play can not success


sorry for poor english


  • Currently Being Moderated
    Apr 9, 2012 10:39 AM   in reply to tazan2homecctv

    some NAT and firewall configurations won't allow P2P communication even if UDP is allowed. much more detailed information about these kinds of cases can be found in this posting:



    most likely one of your peers is behind a symmetric NAT and the other is behind a symmetric or port/address-restricted cone NAT. as mentioned in that post, you can use as a diagnostic tool to help determine why your connection might not be working.

    Mark as:
  • Currently Being Moderated
    Apr 10, 2012 3:09 PM   in reply to tazan2homecctv

    the top picture indicates a symmetric NAT (different translations for different far endpoints). the bottom picture indicates an address&port-restricted cone NAT. this combination will not be able to form a P2P connection.


    if you can't make a direct P2P connection, you must use RTMP.

    Mark as:
  • Currently Being Moderated
    Apr 18, 2012 4:21 PM   in reply to tazan2homecctv

    Not a solution, but maybe worth to mention: At least a reliable way to figure out if a stream is really working (sometimes it doesn't even if there is a NetStream.Play.Start event) is to let it play() and periodically check the byteCount of the NetStreamInfo object. It seems that this returns something around 270 for a surely working stream. Correct me if I'm wrong.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points