This commit is contained in:
Lloyd Brookes
2014-03-01 11:59:59 +01:00
parent 3f11dbb4f9
commit 79a3e1b2ba
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
"dependencies": { "dependencies": {
"connect": "~2.13.0", "connect": "~2.13.0",
"nature": "~0.3.0", "nature": "~0.3.0",
"console-dope": "~0.1.0", "console-dope": "~0.2.0",
"wodge": "~0.2.0" "wodge": "~0.3.0"
} }
} }

4
ws.js
View File

@ -147,11 +147,11 @@ if (argv.help){
} }
oldWrite.call(this, data); oldWrite.call(this, data);
total.bytes += data.length; total.bytes += data.length;
console.column(12).write((w.bytesToSize(total.bytes, 2) + " ").slice(0,12)); console.column(12).write(w.padRight(w.bytesToSize(total.bytes, 2), 12));
}; };
console.column(24).write(++total.connections); console.column(24).write(++total.connections);
socket.on("close", function(){ socket.on("close", function(){
console.column(24).write((--total.connections + " ").slice(0,12)); console.column(24).write(w.padRight(--total.connections));
}); });
}); });
} }