dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Letting each user select only 1 item from a pool

  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    1

    Letting each user select only 1 item from a pool

    I'm working on an 8-user app that runs over a wi-fi network using an XML socket. All of the hardware is located inside a medium sized room in a school building.

    At the start of the app, each user can select 1 role from a pool of 8. However, the socket connection runs at less than realtime, probably because of latency from the wi-fi, so it's possible for two users to make the same selection at the same time. How would I prevent this? Would time stamping help?

    Sorry for the noobish question, I haven't got a lot of exPerience and understanding of networked applications, even ones as simple as this one.

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    This is not really an AS3 question, but what the hell.

    When your clients choose a role, have them expect a response that indicates whether the choice was successful. On the server side, determine if that role is already chosen and return whatever descriptor you want, or just true or false.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center