Comments (6)
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.
@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.
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.
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.
@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.
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)
- installation fail :( HOT 3
- Can not read the property of 'ressource' undefined HOT 1
- No dev in six months. What is the future of NowJS? HOT 13
- Now module Installation failed ..... throwing error in windows
- npm install now ..... throwing error HOT 1
- Not working with Dojo due to Socket.io-client
- Implementing chat module by using Nowjs HOT 6
- now.js and node autocluster core module
- Issue in limit of sending message in chat
- /nowjs/now.js ??
- website HOT 7
- Connecting to nodejs on http from https site HOT 1
- cannot finde module '../build/Release/nodeproxy.node'
- iOS app crashed in release mode while using Nowjs library
- Now doesn't work with latest sockets.io HOT 2
- Does not work with angular-cli: content.charCodeAt is not a function
- possible spam HOT 1
- Error: Cannot find module 'now' HOT 3
- Error: Cannot find module 'now'
- http://www.nowjs.com is not correct HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from now.