Expand my Community achievements bar.

TCP fallback and p2pDataMessaging

Avatar

Level 1

Hi,

I developed an application for which I used Cirrus to provide low latency data messaging between peers. I now decided to use LCCS instead, since from what I understand it should provide fallback to TCP/rtmp when the user is behind a firewall that does not allow UDP traffic.

I now have the application up and running using LCCS, and it provides good performance when using p2pDataMessaging, but I still have no luck getting messages trough on my 3G network on which UDP is blocked.

I cannot find any information on how to ensure fallback, and only find mentions of it being automatic. Is there no fallback when using p2PDataMessaging?

Also, I did manage to get somewhat better latency using Cirrus when tweaking the NetStream multicast settings. Is it not possible to achieve the same low latency when using LCCS?

5 Replies

Avatar

Former Community Member

Hi,

P2pDataMessaging is node based. We do have a fallback for audio and video streams but for data , you would have to turn it P2PDataMessaging for that node off to enable to it send via server again.

Hope this helps

Thanks

Hironmay Basu

Avatar

Level 1

Thanks for the reply,

I tried setting AdobeHSAuthenticator.protocol to "rtmps", and when I do that the application works on my 3G network, but from what I can figure protocol can only be set during login and not changed during a session.

If I can set p2pDataMessaging to false for the nodes to ensure that the traffic goes over TCP that seems like a more practical solution.

Would setting StreamManager.streamMulticast to false have the same effect? Are there any differences depending on what setting I change, or is the end result the same?

I'm not sure how I would detect if a user enter the room can use p2pDataMessaging or not. Would UserDescriptor.isRTMFP actually tell me about the capabilities of a user, and if a user connects where isRTMP is false, can I then either change protocol, node properties and multicast settings to ensure that all communication in the room switches over to TCP?

Avatar

Level 1

Just did a quick check to see if there seems to be any built in functionality that would make it possible to determine if a user is able to do data messaging over p2p, and I cannot seem to find anything.

I tried UserDescriptor.isRTMFP, UserManager.isPeerEnable, and StreamManager.isP2P. They will all return true also when I'm testing with my 3G network, even though it does not let trough any P2P data.

Is there really no convenient way to check if a user is capable of P2P data messaging?

Avatar

Employee

IsRTMFP should be true only if the connection is rtmfp (UDP and p2p ready)

If isP2P is also true you should be succesfully exchanging p2p messages.

Sent from my iPhone

Avatar

Level 1

I'm testing using an AIR on Android application, and using WiFi all data comes trough as it should. Switching to 3G no P2P data comes through, but isRTMFP and isP2P are still both true. I will see if I can block UDP on my router to check if that gives me different results.

But I guess it does seem like I will be forced to rely on implementing a timeout to check if a client is unable to communicate using UDP, since isRTMFP and isP2P cannot be trusted in all scenarios.