Git Product home page Git Product logo

Comments (6)

ericz avatar ericz commented on June 22, 2024

So right now if you do this, the callback you pass in will be called once for each client, in that client's this.now context.

To get the amount of clients connected you can do what you're doing now. We may add a client count feature so you can easily get the number of clients in a group.

Providing a callback (that runs once) when all callbacks have completed is easy to do, internally it would have to be a counter kind of like what you have now. The difficulty lies in the syntax. Not sure how you would pass this callback in during a remote function call on a group

from now.

tommedema avatar tommedema commented on June 22, 2024

@ericz, at the moment I am not doing this because I cannot get the max count. How would I achieve this functionality now?

from now.

ericz avatar ericz commented on June 22, 2024

Oh duhh. My bad you're right you don't have the max. I'll see if its easy to expose a way a count and get back to you

from now.

ericz avatar ericz commented on June 22, 2024

Ok this now exists in the master on github.

Simply do everyone.count or somegroup.count to get the number of users at the time. Make sure you are careful as its possible that the remote call does not return before the usercount changes.

This is an undocumented feature and the api for this will probably change in the future

from now.

tommedema avatar tommedema commented on June 22, 2024

@ericz, thanks. Should a new issue be created such as "document group.count and improve API" or do you have an internal ToDo?

Just figured that it should not be forgotten

from now.

ericz avatar ericz commented on June 22, 2024

I have an internal todo already so no issue is necessary, thanks!

On Thu, Apr 14, 2011 at 9:39 AM, tommedema
[email protected]
wrote:

@ericz, thanks. Should a new issue be created such as "document group.count and improve API" or do you have an internal ToDo?

Just figured that it should not be forgotten

Reply to this email directly or view it on GitHub:
#49 (comment)

510-691-3951
EECS Student at UC Berkeley
http://ericzhang.com

from now.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.