Permalink
Browse files

minor fixes

  • Loading branch information...
1 parent cc93382 commit 24d79ecc966f9222e9ce3eba3dc061d11b728b43 cronopio committed Sep 14, 2011
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
@@ -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){

0 comments on commit 24d79ec

Please sign in to comment.