Skip to content

Commit

Permalink
[minor] send sender and time sent
Browse files Browse the repository at this point in the history
  • Loading branch information
Cam Pedersen committed Feb 21, 2012
1 parent ad82703 commit 42cbab3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/peer.js
Expand Up @@ -31,6 +31,8 @@ Peer.prototype.handleConnection = function (client) {
* Should intelligently cast `data`
*/
Peer.prototype.send = function (data) {
data.sender = this.parent._.host;
data.send = +new Date();
this.$.write(JSON.stringify(data) + '\r\n');
}

Expand Down

0 comments on commit 42cbab3

Please sign in to comment.