如何跟踪 Channel API 聊天中的活跃用户数量
我正在使用 google Channel API 和 appengine 进行小型聊天。有没有一种简单的方法可以知道有多少用户活跃在聊天中?
谢谢, 大卫
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要求跟踪有多少客户端连接到给定通道,答案应该很简单: 1. Channel API 不支持广播。
如果您询问如何跟踪客户端是否连接到通道,那么现在没有内置的方法可以做到这一点。您可以查看此问题的答案以获取更多信息:AppEngine Channel API - 检查通道是否仍然打开的最佳方式(服务器端)
Channel API 的存在(在上面提到)问题)很快就会到来。
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.