2 Replies Latest reply on Jul 12, 2011 8:51 AM by Michael Thornburgh

    Using NetGroup with server-less "rtmfp:", never get NetGroup.Neighbor.Connect

    egifford@megalos

      Hello,

       

      I'm investigating server-less functionality of RTMFP to build a stand-alone version of a working multiplayer game based on NetGroup/NetStream. To test the server-less feature, I'm using demo from here( http://blog.yoz.sk/2010/07/rtmfp-connection-tester/ )

       

      If I connect using ...

       

      "rtmfp://stratus.rtmfp.net", I get

       

      NetConnection.Connect.Success (0.12 sec)

      NetStream.Connect.Success (0.45 sec)

      NetStream.Publish.Start (0.49 sec)

      NetStream.Connect.Success (0.5 sec)

      NetStream.Play.Reset (0.53 sec)

      NetStream.Play.Start (0.54 sec)

      NetGroup.Connect.Success (0.54 sec)

      NetGroup.Neighbor.Connect (0.78 sec)

       

       

      but when I use "rtmfp:" instead, I get (everything but "Neighbor.Connect")

       

      NetConnection.Connect.Success (0.07 sec)

      NetStream.Connect.Success (0.1 sec)

      NetStream.Publish.Start (0.1 sec)

      NetStream.Connect.Success (0.1 sec)

      NetStream.Play.Reset (0.1 sec)

      NetStream.Play.Start (0.11 sec)

      NetGroup.Connect.Success (0.11 sec)

       

       

      1) Are Neighbor connection notifications supported using "rtmfp:"/server-less mode?

      2) If so, where's the gotcha? (I'm using example downloaded here to test: http://blog.yoz.sk/2010/07/rtmfp-connection-tester/ )

       

      Thanks so much for any advice!

        • 1. Re: Using NetGroup with server-less "rtmfp:", never get NetGroup.Neighbor.Connect
          egifford@megalos Level 1

          Found some information on the subject here:

          http://www.flashrealtime.com/local-flash-peer-to-peer-communication-over-lan-without-cirru s/

           

          Missing bit in example were two calls to GroupSpecifier,

          my working GroupSpecifier looks like this now:

           

          var groupSpecifier:GroupSpecifier = new GroupSpecifier("lkasjdflkjasdf");

          groupSpecifier.postingEnabled=true;

          groupSpecifier.ipMulticastMemberUpdatesEnabled=true;

          groupSpecifier.addIPMulticastAddress("225.225.0.1:30303");

           

           

          Now, however, it looks like the problem is that DIRECT_CONNECTIONS are not supported on LAN. I was using this for the lowest possible latency for a high-speed, latency sensitive game.

           

          So, some questions:

           

          Are direct connetions really not supported on LAN?

           

          If they are not supported, and since I am on a LAN (assuming good hardware), can anyone estimate the latency I would see using group posting in place of direct connection?

           

          I'll eventually need to build a demo of this, but any real-world latency numbers for LAN-based group posting would be much appreciated.

          • 2. Re: Using NetGroup with server-less "rtmfp:", never get NetGroup.Neighbor.Connect
            Michael Thornburgh Adobe Employee

            DIRECT_CONNECTIONS NetStreams are not currently supported with serverless NetConnections.  however, a future release of Flash Player will support DIRECT_CONNECTIONS mode on serverless NetConnections if you already have a session to the other peer (for example, by creating a group with ipMulticastMemberUpdatesEnabled as you've done and becoming a neighbor with the desired peer).

             

            posting is not low latency.  however, if your group has 10 or fewer members, it will be fully meshed (that is, every member will have a direct neighbor connection to every other member, with nearly 100% probability -- the probability goes down past about 10).

             

            you can use the directed routing method NetGroup.sendToAllNeighbors() (if you've enabled routing in the groupspec) to send a message to all of your neighbors immediately with low latency.  when your group is small, as i've mentioned, "all of your neighbors" is "everyone in the group".  if your group is large, you need to use posting to get the message to every member, but that will take substantially longer.