Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.91k stars 175 forks source link

use node event system #54

Closed tommedema closed 13 years ago

tommedema commented 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
ericz commented 13 years ago

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

tommedema commented 13 years ago

Great. Thanks.