[Reprint] P2P groupspecifier class explained in details Part 1

Source: Internet
Author: User

Original article: http://www.flashrealtime.com/p2p-groupspecifier-explained-1/ turn to prevent being broken by the wall

If you 've tried my tutorial onCreating a simple chat using P2P netgroupInFlash Player 10.1., You might have been wondering what the other parameters you can set up mean.

Groupspecifier is a very powerful class and asdocs are good resource to look in, but I thought I 'd write few more words on this topic since it's easier to understand with a little more explanation.

PostingenabledAndMulticastenabled
These are self-explanatory. Just a little note: the difference between multicast and posting is simply in the overhead used during their management.Posting shoshould be used when you have lots of senders sending relatively little data (like chat). multicast when you have fewer senders sending lots of data (video, chat).

peertopeerdisabled
Why shoshould I disable P2P when I am building a P2P application? Obvious question. this one is for IP multicast.
application-level-Multicast (so called P2P Multicast) is multicast established over peers.
native IP multicast is multicast enabled in the network-it must be supported by routers and the network itself.
fusion is application-level-multicast and native IP multicast used together.
so, when you disable p2p by saying peertopeerdisabled = true , your app will use only native IP multicast, which is more efficient, but works mostly only in closed networks (like a company network ).

Serverchannelenabled
Opens supporting functions from the server. In the basic scenario it enables auto-bootstrapping. bootstrapping in this context means adding peers to the group. You can do this manually by callingAddbootstrappeerFunction or settingServerchannelenabled = trueTo make it automatic. InP2P chat exampleIt basically takes care of adding peers to a group and establishes communication between them.

Groupspecwithauthorizations and groupspecwithoutauthorizations
Difference? Security. If you set a posting or multicast password, the one "with" can post or multicast, the one "without" is receive-only.

Remember-groupspecifier is technically a string combined of properties and the name. If you change a property you will be in a different group.

More to come soon.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.