Search code examples
google-app-enginechatroomchannel-api

How to keep track of the number of active user in a Channel API chat


I'm working on a small chat using the google Channel API and appengine. Is there an easy way to know how many users are active on the chat?

Thanks, David


Solution

  • If you're asking to track how many clients are connected to a given channel, the answer should be easy: 1. The Channel API doesn't support broadcast.

    If you're asking for how to track whether a client is connected to a channel, there's not a built-in way to do that right now. You can see the answer to this question for more info: AppEngine Channel API - Best way to check if a channel is still open (server side)

    Presence for the Channel API (referenced in the above question) is coming very, very soon.