Transferring Sound Data with Binary.JS and Buffering for Smooth Playback is a great websockets module and it does a lot of things very well; however, one thing it doesn’t handle well is binary data.  Supposedly, version 1.0 added support for binary data; however, I wasn’t able to get it to behave properly.

Binary.js is a websockets module that is built for handling binary data.  In this example, we set up Binary.js on the server and also on the client, and allow clients to broadcast messages to all other clients.  The original application was audio chat for a multi-player game.  But the concepts here will be a good demonstration of Binary.js and also the html5 web audio API.