olalonde/mtgox-socket-client — pull request #2 by johnwarden (2013-08-13 23:10:06+00:00)
Title: Various Modifications

Hey,

So this package was a great starting point for me working on a mtgox daytrade app. I ended up making a bunch of modifications to it as I encountered various challenges.

The modifications include most importantly some reconnection logic, because I found mtgox was constantly disconnecting mysteriously, and for some reason the socket.io library wasn't able to reconnect and just ended up hanging. This code will detect that scenario and automatically kill and recreate the client.

I have also added the ability for the user to optionally choose which channels to subscribe to, as well as the optional ability to subscribe to client-specific channels (e.g. my individual trades) if the user includes a keys.js file.

Also made misc changes that made this module more useable in the Npm/Meteor environment I was using.

I'm not sure that all these changes make sense to you, especially some backwords-compatibility-breaking changes. But take a look and tell me what you think!