jijo-paulose / node-xmpp-bosh

Automatically exported from code.google.com/p/node-xmpp-bosh
0 stars 0 forks source link

Refactoring of srv.js #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Change the API of srv.js to raise events on the original socket rather than 
return an EventEmitter on which it raises events. Is this a good idea?

Original issue reported on code.google.com by dhruvb...@gmail.com on 7 Jun 2011 at 1:18

GoogleCodeExporter commented 9 years ago
Done. (fixed by commit #300)

The srv.js API has been changed

* It no longer returns an EventEmitter on which clients should monitor the 
'connect' and 'error' events
* Raises the 'connect' and 'error' events directly on the socket passed 
(earlier too it did so, but also did it on an event emitter that it returned, 
which was redundant).
* Earlier, it raised the 'error' event for every failed connection that it 
tried. Now, it raises the 'error' OR 'connect' event EXACTLY once to reflect 
the failure or success of the connect operation.

Original comment by dhruvb...@gmail.com on 9 Jun 2011 at 8:21