Jorge Miranda
Jorge Miranda

Reputation: 231

Flash/AIR Local Network connection with groupSpec.peerToPeerDisabled = true, NetConnection and "rtmfp:"

I need to stablish a connection between a flash in a web page and an air application in the local network. I need to auto-discover the clients so I want to use "rtmfp".

I'm being able to do it by using:

_nc = new NetConnection();
...
_nc.connect("rtmfp:");
...
var groupSpec:GroupSpecifier = new GroupSpecifier("foo");
groupSpec.postingEnabled = true;
groupSpec.routingEnabled = true;
groupSpec.serverChannelEnabled = true;
groupSpec.objectReplicationEnabled = true;
groupSpec.multicastEnabled = true;
groupSpec.ipMulticastMemberUpdatesEnabled = true;
groupSpec.addIPMulticastAddress(multicastAddress);
//groupSpec.peerToPeerDisabled = true;
...

But when I uncomment the line groupSpec.peerToPeerDisabled = true; because I need to avoid the "Peer Assited Networking" popup (this in mandatory in my project), the clients cant send messages to each other... (I don't mind P2P, I want to trigger messages to all the clients)

ON the other hand, the events NetStatusCode.NETGROUP_CONNECT_SUCCESS and NetStatusCode.NETGROUP_CONNECT_SUCCESS are being triggered successfully in all the cases.

Has anyone connect several clients in a LAN by using NetConnection and "rtmfp:", but with "groupSpec.peerToPeerDisabled = true".

The other alternative is to search by brute force to clients in a range of local ips that are listening for a port... but the handshake could take minutes!.

But with NetConnection and "rtmfp:" the clients discover each other almost instantly!!!!

Thanks in advance

Upvotes: 1

Views: 213

Answers (0)

Related Questions