Hello: How can I designate a master peer?

Hello,
I'm able to create a peer network and chat.
I want to have one peer be a master peer that people login to and save/load information from.
Without a master peer, I can still fake a master peer, but it has security vulnerabilities that could render my ap useless if someone wants to be a jerk.
,Jim

Michael Thornburgh: Can you tell me how the code would look?
I can't figure out how to transmit a password on the network without everyone seeing it.
Sure you can encrypt the password, but if someone decompiles the source(ez), they can find the encryption code and then use it to decrypt the password which is sent over public P2P.
Here is code from @tomkrcha:
In it, I can get a chat room, where everyone can pass information between each other.
I can not pass private information though because I can't figure out how to do direct connects via P2P.  Is there a way to do direct connect P2P?  This would be important for games where latency matters.
Cirrus is exciting for me because it means I might not have to pay for an expensive server to run my P2P coding, and then I can run games that would require a milliondollar server for free!  I've written a P2P server/peer architecture in C/C++ for action games, but I'm having trouble finding out how Cirrus works.
I think the easiest solution would be if Cirrus allowed you to connect to IP addresses as a direct connect P2P connection.  Then if you had a server with a static IP running someplace, peers could connect to that "master peer" directly for login details.  Is it possible to direct connect to an IP using UDP P2P? If there is, Cirrus is much more useful! 
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="connect()">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            private const SERVER:String = "rtmfp://p2p.rtmfp.net/";
            private const DEVKEY:String = "xed out for security reasons";
            private var nc:NetConnection;
            private var netGroup:NetGroup;
            [Bindable]
            private var user:String;
            [Bindable]
            private var connected:Boolean = false;
            private function connect():void{
                nc = new NetConnection();
                nc.addEventListener(NetStatusEvent.NET_STATUS,netStatus);
                nc.connect(SERVER+DEVKEY);   
            private function netStatus(event:NetStatusEvent):void{
                write(event.info.code);
                switch(event.info.code){
                    case "NetConnection.Connect.Success":
                        setupGroup()
                        break;
                    case "NetGroup.Connect.Success":
                        connected = true;
                        break;
                    case "NetGroup.Posting.Notify":
                        receiveMessage(event.info.message);
                        break;
            private function setupGroup():void{
                var groupspec:GroupSpecifier = new GroupSpecifier("Jimsgroup");
                groupspec.serverChannelEnabled = true;
                groupspec.postingEnabled = true;
                trace("Groupspec: "+groupspec.groupspecWithAuthorizations());
                netGroup = new NetGroup(nc,groupspec.groupspecWithAuthorizations());
                netGroup.addEventListener(NetStatusEvent.NET_STATUS,netStatus);
                user = "user"+Math.round(Math.random()*10000);
            private var sequence:uint = 0;
            private function sendMessage():void{
                var message:Object = new Object();
                message.sender = netGroup.convertPeerIDToGroupAddress(nc.nearID);
                //message.sequence = sequence++;
                message.user = txtUser.text;
                message.text = txtMessage.text;
                netGroup.post(message);
                receiveMessage(message);
                txtMessage.text = "";
            private function receiveMessage(message:Object):void{
                write(message.user+": "+message.text);
            private function write(txt:String):void{
                txtHistory.text += txt+"\n";
        ]]>
    </fx:Script>
    <s:TextArea left="10" right="10" top="10" bottom="40" id="txtHistory"/>
    <s:TextInput x="10" id="txtUser" text="{user}" bottom="10"/>
    <s:TextInput left="145" right="88" id="txtMessage" bottom="10" enter="sendMessage()"/>
    <s:Button label="Send" click="sendMessage()" enabled="{connected}" bottom="10" right="10"/>
</s:Application>

Similar Messages

  • Hello, How can I make borders in pages?

    Hello, How can I make borders in pages?

    What version of Pages?
    Just make a suitable bordered shape and make it a Master Object in the background.
    PS. It is the sure fire way to make your work look amateur, which is why it is not in the Apple templates.
    Peter

  • Hello, How can I delete episodes already seing from my apple tv? But I want to do that thru the aple TV. thanks

    Hello
    How can i delete some episodes on my apple tv? But i wish doind it thru the apple tv
    thanks
    Paula

    Welcome to the Apple Community.
    You can't delete shows from your history, you can only hide them and you need to do that from iTunes on your computer or mobile device

  • Hello how can i transfer photo for my old computer to the new one

    hello how can i transfer photo for my old computer to the new one

    If your computers are connected to the same network, you can turn on Sharing to allow you to see the contents of one from the other and do transfers. If there is no network, you can use "target disk mode" explained here: http://support.apple.com/kb/PH13842
    Otherwise, you will need to use external storage such as a USB flash drive.

  • Hello, How can I edit or delete a custom label in the contacts list on iOS 7.0.3 on iPhone 4S ?

    Hello, How can I edit or delete a custom label in the contacts list on iOS 7.0.3 on iPhone 4S ?
    i need it so muchhh!

    Sort of depend on what you are trying to do precisely. In Edit mode, if you tap on any label, you will be given a list of options, plus an Add Custom Label option near the bottom of the list

  • How can we pass the master report value in to detail  report

    Hi All,
    My question is how can I pass the master report value in to detail (Child) report filter?
    I mean I have one master report if I click on employee name then I have to pass the employee id in to details report filter. Then detail report will display data for that particular employee.
    How can I achieve this one in OBIEE?
    Please help me to resolve this issue. Thanks in advance for your time and support.

    In that case, you should look at using Go Url. In your column formula for the employee name, create a hyperlink to the detail report and pass the employee id.
    Take a look at this post: Re: Dyanmic display of the Image Link URL
    Thanks!

  • How can I create a master PDX that pulls from multiple other PDXs?

    I process aviation maintenance manuals, with the individual manuals having their own PDX. How can I create a master PDX that pulls from the individual PDXs?
    I have access to myriad versions of Windows and Acrobat so there's that...

    I’ve got 100s of manuals each with their own PDX. I’ve been asked to create a master PDX that in effect combines all of the individual PDXs into a single (cross-manufacturer, cross-fleet, cross-manual-type) searchable PDX that can be easily updated.

  • How can I designate the disk for the iPhoto library?

    how can I designate the disk for the iPhoto library?

    Moving the iPhoto library is safe and simple - quit iPhoto and drag the iPhoto library intact as a single entity to the external drive - depress the option key and launch iPhoto using the "select library" option to point to the new location on the external drive - fully test it and then trash the old library on the internal drive (test one more time prior to emptying the trash)
    And be sure that the External drive is formatted Mac OS extended (journaled) (iPhoto does not work with drives with other formats) and that it is always available prior to launching iPhoto
    And backup soon and often - having your iPhoto library on an external drive is not a backup and if you are using Time Machine you need to check and be sure that TM is backing up your external drive
    LN

  • How can i designate the location of the purchased music from itune store?, how can i designate the location of the purchased music from itune store?

    how can i designate the location of the purchased music from itune store?, how can i designate the location of the purchased music from itune store?

    Hi,
    Thanks.  I know how to do that, however, I thought it only works with the imported content not the purchased ones.  The reason for wanting this was that I keep all my music in NAS drive for SONOS (the wireless music system) will need the music to be in NAS so that it can play music while the mac is on sleep mode.
    Anyhow, I will try again and let you know if it does work.
    Thanks again.

  • How can I download gps-master in my macbook?

    How can I download gps-master in my macbook? Thanks.

    There are a couple ways to run windows on a mac.
    1) install windows and directly on the machine as the only, native OS
    2) Install a product from Apple called Boot Camp and dual boot the machine
    3) Install a product that allows you to virtualize guest operating systems (Windows, Unix, etc).  Which means the guest OS is running in a window under Mac OS X (concurrently)
    Options (3) is what I proposed.  This means you will need to:
    a) download one of the following (you can search using Google to locate):
      - VirtualBox (free)
      - Parallels (Paid)
      - VMWare Fusion (Paid)
    b) install the one you select from (a)  I
    c) Start the program and set up a virtual environment
    d) run the virtual environment and install Windows from your legal install disc.
    e) once the install is complete start the virtualized Windows and download the software.
    Personally I would look for gps software that runs on the mac before going through all this.  Do a search in the App store for GPS.  I found a couple options that can plot GPS track data.

  • Hello, How can I save audios rcvd from whatsup in Iphone 5 ? Thanks

    Hello,
    How can I save audios rcvd from whatsup in Iphone 5 ?
    Thanks

    You might want to start with reading the iPhone user guide. Basic processes like synching are covered: http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    In short, you must use iTunes to synch photos. You can also get more information in this knowledgeable article: iTunes: Syncing photos - Apple Support

  • Hello, how can i record my own ringtones and acti...

    Hello,  how can i record my own ringtones and activate them for listening?
    thanks a lot for a feedback
    kind regards
    nils

    What device are you currently using?
    Nokia C6-00 user.

  • How can I upload text master data for attribute-only Charactertic?

    I can't create infosource for attribute-only Charactertic via direct update from Infoobject, because attribute-only Charactertics you can't choose from available infoobject.
    How can I upload text master data for attribute-only Charactertic?
    Thanks!

    Hi roberto,
    I soloved the problem. I can input the attribute-only char directly in the text box instead of choosing from list of infoobjects, but I still can't find the char in infoobject selection dialog even using search.

  • How can we delete item master records in B1?

    Hi everyone,
    Can anyone tell me to how can we delete item master records in B1?
    Regards,
    Ronauk

    Hi Ronauk,
    Item Master Data --> Right click and Remove Items
    Before that check the items
    1.Item was '0' qty
    2.Item Master Data--Inventory Data-->Check all the warehouse-->Instock-->Commitment->Order Qty
    Removal items is fresh nothing problem for removing process.
    Is there any postings, the all related data's are abused.
    Regards,
    J.M.Halik

  • Hello how can i download youtube videos on my macbook pro...plz tell me about downloader

    hello how can i download youtube videos on my macbook pro...plz

    nbar wrote:
    Where are you getting (A) from? There is nothing inherently illegal about it, AFAIK.
    You would be incorrect on that.  
    Commercial music videos are not to be downloaded, nor is there any difference between that and illegal torrent downloading of copyrighted material.
    Such actions pertaining to commercial copyrighted videos / music videos (lots on youtube) is not legal.
    Any distribution of videos, music or text without the express permission of the copyright-holder is copyright infringement
    regardless of all of that, Google/Youtube clearly notes that its against their policy to allow same from their site on such materials (not all, but most of it there).
    most such videos are not free and "open public domain" materials
    5. Your Use of Content
    In addition to the general restrictions above, the following restrictions and conditions apply specifically to your use of Content.
    The Content on the Service, and the trademarks, service marks and logos ("Marks") on the Service, are owned by or licensed to YouTube, subject to copyright and other intellectual property rights under the law.
    Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.

Maybe you are looking for

  • Calendar to get week number of current month

    Hi All, Description: Currently I am working on an application which require to calculate some data for current month from a database where I have the data of all the previous and current month of that year, I can take week number as criteria. Help Re

  • How to download adobe interactive form layout

    Hi Experts,     can any one  suggest me how to download the adobe interactive form PDF layout including  output values. when we download the form values are  not displaying. Thanks in advance. Edited by: krishnaveni.Nomula on Sep 28, 2011 4:44 PM

  • N82 Only default alarm tone

    I'm having the strangest problem: i can't change my alarm tone. I have a microSD card inserted, it has mp3s on it, the phone recognizes each and every one of them, i use some of them as ringtones etc. So everything seems to be working. However, when

  • I am trying to write a double buffered data acquisition program using MFC and a callback function.

    i am trying to do a double buffer data acquisition using MFC application framework in Visual Studio.i want to use a callback function to notify when the buffer is half full.do you have some sample reference program that can help me?

  • Disks not avialable and cannot add new disks to existing pools

    I have a few disks that are RAW and I want to add them to existing pools.  However, only 1 disk shows up as a Primordial disk and the others do not.   I cannot add these drives to a new volume and when I try to add any drive to an existing pool, the