Closed tommedema closed 13 years ago
Instead of everyone.connected(function() { }); use the node event system so that people can do everyone.on('connected') etc.
This has several advantages:
- consistent with node style - allows unregistering event listeners - allows multiple listeners
The server already uses the node eventemitter system.
.connected is simply an alias for .on('connect'
They are the same. See the bottom of: http://nowjs.com/doc
Great. Thanks.
Instead of everyone.connected(function() { }); use the node event system so that people can do everyone.on('connected') etc.
This has several advantages: