How can I count the participants' number in TextChatApp? (using SharedObject, FMS)

Hi all.
How can I count participants' number?
If the 3st user enter the room, the 3st user have to know that how many users are in the room.
How do I know how many users are in the room?
Thanks in advanced.
Kevin.

You have server side hooks for connections coming in or being closed (including here custom code for server disconnecting users for idle purposes).
you need to keep track of the connections I don't remember now what FMS offers out of the box. Let's assume not much.
When connection is coming in you can choose to accept or reject it. When you accept a connection you need to add it to your existing connections array or whatever data structure you use to keep track of them. Also you need to iterate to all connected users (clients) and call a custom method "userJoined()" on them to notify that a new user has joined.
When a user leaves you need to remove the user from the collection and also notify that it left.
on wowza you have stuff like :
private HashSet();
public void onConnect(IClient client, RequestFunction function,
            AMFDataList params) {
public void onDisconnect(IClient client) {
public void onConnectAccept(IClient client) {
    _connectedClients.add(client); 
    sendUserJoined();
@param client
    public void onConnectReject(IClient client) {
         _connectedClients.remove(client); 
        sendUserLeft();
    public void sendUserJoined(String userName)
        Iterator it = _connectedClients.iterator();
        while (it.hasNext()) { 
            IClient each =  it.next();
                each.call("userLeft", userName);
FMS has similar hooks. This is simplified but you have a rough idea. You can call clients with no parameters and then is up to client so call back for updates to the server if interested. You need to implement "userJoined" and userLeft client side also.
C

Similar Messages

  • How can I change the phone number that's used for my iMessages

    How can I change the phone number that's used for my iMessages

    I Know but i did a number port and the iMessages is showing up using the original number that I had when I first purchased this phone from tmobile

  • How can I count the total number of keyframes in a project in After effects?

    I would just like to know how to get the quantity of how many keyframes I have in my project. I've always thought counting keyframes is pretty interesting xD

    That's a new one!  I don't think anyone's ever been curious about that.  Which means it's an excellent bet that there isn' any automated way to do it: it may be interesting from an academic viewpoint, but I'm stumped about a practical use.  I think you'd just have to count layer by layer, and hope you don't get interrupted.

  • I have lost my iphone, how can i get the IMEI number?

    i have lost my iphone, how can i get the IMEI number?

    If you need the IMEI for an insurance or police report:
    how to find IMEI, etc
    http://support.apple.com/kb/HT4061?viewlocale=en_US&locale=en_US
    But as Carolyn Samit said above, you cannot track the iPhone by IMEI.

  • How can I find the serial number for my creative suite CS6 I bought it from a store.

    How can I find the serial number for my creative suite CS6 I bought it from a store.

    https://www.adobe.com/account.html for serial numbers or subscriptions on your Adobe page... or
    Lost serial # http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • How can we find the Idoc number which posts the material document in SAP

    Hi All,
    How can we find the Idoc number which posts the material document in SAP. We could not able to find the IDOC number from the material document which was posted by Idoc.
    Thanks
    Chandru

    Hi,
    In MIGO you can go to service of object(Just above show overview) and check 5th option workflow you will find the idoc number.
    regards
    suresh

  • How can I remove the page number from the first page of the document that is the cover page?

    How can I remove the page number from the first page of the document that is the cover page?

    If you open the Pages panel, (Window>Pages) you will see thumbnails of your master pages and your document pages. In new documents, there is usually a master called A-Master and one called None. If you drag the thumbnail of the None master onto the thumbnail of a document page, it will apply that master to that page. Presumably, you have made your page numbers on A-Master, so this will usually do the trick. If you have elements on A-Master that you need on the first page, but just not the page number, you can duplicate A-Master (which, by default will give you B-Master, but you can change the names if you like) and remove the page number on the duplicate and apply that to the document page.
    It might also be worth noting that you can apply master pages in the fly-out of the Pages panel. Go to the fly-out triangle and go down to Apply Master to Pages…, then select a master to apply and the range of pages (1-8 will give you all 8, 1, 3, 5, 7 will be the odds, 1-3, 4, 6-8 if you want continuous ranges and individual pages).

  • How can i remove the phone number from the text messages that i receive in the notification center

    how can i remove the phone number from the text messages that i receive in the notification center?

    You choose whether to see text messages in Notification Center or not.  If you elect to see them, they will display the phone number (unless they are from a contact in your contacts list).
    You can choose not to see them at Settings > Notification Center > Messages.

  • How can I find the serial number for my stolen iPad that's associated with my apple ID ?

    How can I find the serial number for my stolen iPad that's associated with my apple ID ?

    If you registered it with Apple check your registered items at Your Support Profile for Registered Purchases. Also, see iOS- How to find the serial number, IMEI, MEID, CDN, and ICCID number.
    What To Do If Your iDevice Is Lost Or Stolen
    If you activated Find My Phone before it was lost or stolen, you can track it only if Wi-Fi is enabled on the device. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. What to do if your iOS device is lost or stolen
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
      8. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • I want to setup Lightroom on my new laptop.  I have my latest serial number but it is the upgrade serial number for LR5.  I do not have the original serial number from my purchase of LR3.  How can I recover the serial number from my original purchase of ?

    I want to setup LR on my new laptop.  I have the serial number from my latest purchase but not the original purchase of LR3.  How can I recover the serial number from my original LR purchase?

    If you did register it back then, open your Adobe account with your Adobe ID and you will find it there: Find your serial number quickly
    If you still have it installed, open the System info in Help menu or look here:
    C:\ProgramData\Adobe\Lightroom\Lightroom xy Registration.lrreg

  • Hi,  I lost my serial number for PS Elements11 following computer crash. Os is W7. I have the cd installation disc but there is no serial number with it or in the envelope  ..  How can I obtain the serial number please?     Thanks

    I lost my seriel number for PS Elements 11 following computer crash. Os is W7
    Peter Jones Aug 27, 2014 5:36 AM   
    Hi,
    I lost my serial number for PS Elements 11 following computer crash. Os is W7. I have the cd installation disc but there is no serial number with it or in the envelope
    How can I obtain the serial number please?
    Thanks

    If you registered the software you should be able to find the serial number thru your Adobe account online.
    To locate the serial number:
    http://helpx.adobe.com/x-productkb/global/find-serial-number.html

  • I won Lightroom 1.0 a few years ago at an Adobe clinic in Fremont. I have since misplaced the original disk and cannot get the program to open. It wants a serial number and I don't have one. How can I get the serial number so I can use the software?

    I won Lightroom 1.0 as a door prize a few years ago at an Adobe clinic in Fremont. I have since misplaced the original disk and cannot get the program to open. It wants a serial number and I don't have one. How can I get the serial number so I can use the software?

    Thanks for replying, Jim. I wasn't planning to use it for raw images. I shoot film, black and white, and have many negatives I want to print. I am unfamiliar with the upgrades in Lightroom. I wasn't unhappy with the version I have. It was useful for my purposes.
    Because it was a few years ago, I don't remember if I registered the product. I was able to login to my account. But could not find a path to communicate with Adobe. I will keep trying.
    Ken

  • How can I get the serial number for Premiere 11?

    In october 2012 I´ve bought a bundle pack with Photoshop Elements 11 and Premiere 11. After a hard disk crash i was about to reinstall them both but my wife has trown the envelope in the garbage... = No Serial number available!!
    I´ve registered the serial number for Photoshop Element 11 on Adobe, but not the key for Premiere (they are on the same dvd).
    How can I get the serial number for Premiere 11?

    I do not think there is any way for anyone here to help you (we are just other users) so you are going to have to contact Adobe
    Forum for Download & Install & Setup problems
    http://forums.adobe.com/community/download_install_setup
    Chat http://www.adobe.com/support/download-install/supportinfo/
    -or http://www.adobe.com/support/chat/ivrchat.html
    And tell your wife to be more careful about throwing things away

  • HT1937 How can i changen the phone number on ipad2

    How can i change the phone number on my ipad?

    Hi this is Dr Shabd
    The only and easiest way is
    1-Go to Setting - Switch off the Face Time
    2-Go to Settig - Switch off the iMessage
    3-Go to Setting - General Settings- Reset Network Settings
    4 - Go to Setting Switch on FaceTime - Sign in with your existing Apple / iCloud ID
    You can see the Mobile number is changed now.
    For more queries do write me or Whatsapp me.

  • Did i buy Adobe Photoshop & Adobe premiere elments but uTrshed  the box before instalation how can i get the serial number?

    did i buy Adobe Photoshop & Adobe premiere elments but uTrshed the box before instalation how can i get the serial number?

    I suggest that you Contact Customer Care - click on the Still need help? button to chat with an agent.

Maybe you are looking for

  • External hard drive, what FS to use...

    External hard drive of 2TB, what filesystem to use and to protect the disk? The main concern is portability, I might need to use the disk in other OS or distro. The second concern is safety, if I lose the disk I would have important data lost with it

  • Using variable to create a "cartoon strip"

    Ok, here's my situation. It's a bit complicated to explain, but probably does not have a complicated answer, so please bear with me. I'm developing a script that will allow the user (who happen to be 2nd grade students) to create their own cartoon st

  • TV output

    I have the newest touch with the latest updates, apple universal dock and composite AV Cable. The set-up is plugged into my LCD TV and works great for playing movies/youtube/BBC iPlayer. However anyone with the same set-up will know that you can only

  • Where can i get library content for Encore cs6?

    Where can i get library content for Encore cs6?

  • Storing data in SQL-connection problem

    hello, I'm a new user with pdf and not much of a programmer. I've built a fillable form and added some buttons to email/print. I've set up a data connection with sql. The connection works, I can bind the fields. Now what i'm looking to do is when the