Permalink
Browse files

socket: emit `data` event (synonym with `message`)

  • Loading branch information...
1 parent 95ded5d commit 9d9fe9e2e2571274dc3b94aafc203d21db54b56a @rauchg rauchg committed Dec 17, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/socket.js
View
3 lib/socket.js
@@ -97,7 +97,8 @@ Socket.prototype.onPacket = function (packet) {
break;
case 'message':
- this.emit('message', null == packet.data ? '' : packet.data);
+ this.emit('data', packet.data);
+ this.emit('message', packet.data);
break;
}
} else {

0 comments on commit 9d9fe9e

Please sign in to comment.