Skip to content

Commit

Permalink
[minor] Also transmit the received bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Apr 4, 2013
1 parent eced998 commit 3138097
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion thunderbolt.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ process.on('message', function message(task) {
});

socket.on('message', function message(data) {
process.send({ type: 'message', latency: Date.now() - socket.last });
process.send({
type: 'message', latency: Date.now() - socket.last,
length: Buffer.byteLength(data || '')
});
});

socket.on('close', function close() {
Expand Down

0 comments on commit 3138097

Please sign in to comment.