mpp-client-xt is a modified version of the official
mpp-client package to make it more useful and easier to use. The changes are as follows:
- Module variables are properly prefixed with
varinstead of assigning to the global object.
- URI argument now defaults to
wss://www.multiplayerpiano.comso you don't have to pass any arguments if you're using it with that.
- Proxy support - Add an https or socks proxy url as the second argument to the constructor.
- WebSocket binary type set to "arraybuffer" to support ming's alternative server with binary note data extension.
- WebSocket errors are emitted from the Client as "error" events to comply with standard Node.js practices and allow you to handle the errors your way. Note that "error" events stop the processes if there are no listeners so make sure to add an "error" listener if you want the client to reconnect instead of shutting down the process.
- WebSocket message parser only parses strings now (so it won't crash with binary note data) and parsing errors are caught and emitted in the "error" event (again make sure to add an "error" listener).
- A bunch of extra methods have been added to make the client easier to use. Now you can just
var MPPclient =var mppClient =mppClientmppClientstartmppClient
For more information just look at the code!