modified version of DanKnox's websocket-rails for custom message format.