Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor fixes

  • Loading branch information...
commit 24d79ecc966f9222e9ce3eba3dc061d11b728b43 1 parent cc93382
cronopio authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 bin/ws
  2. +2 −2 lib/ws.js
View
4 bin/ws
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-var WebSocketHook = require('../lib/hookws').HookSocket;
+var WebSocketHook = require('../lib/ws').HookSocket;
var mtgoxTest = new WebSocketHook({
name: 'mtgox',
@@ -11,7 +11,7 @@ var mtgoxTest = new WebSocketHook({
mtgoxTest.on('websocket::message',function(data){
if (data.op == 'subscribe'){
- console.log('Now suscribe to ');
+ console.log('Now suscribe to '+data.channel);
}
console.log(data);
});
View
4 lib/ws.js
@@ -3,7 +3,7 @@
*/
var Hook = require('hook.io').Hook,
util = require('util'),
- WebSocket = require('./websocket').WebSocket;
+ WebSocket = require('./websocketModule').WebSocket;
var HookSocket = exports.HookSocket = function(options){
Hook.call(this, options);
@@ -17,7 +17,7 @@ var HookSocket = exports.HookSocket = function(options){
});
ws.on('message', function(msg){
- self.emit('websocket::message',msg);
+ self.emit('websocket::message',JSON.parse(msg));
});
ws.on('wserror', function(e){
Please sign in to comment.
Something went wrong with that request. Please try again.