3 ms·
var b = io.connect(); setInterval(function() {"00001001".split('').forEach(function(n) { b.emit('input',n); });},10) I found it interesting to see how hard I
by nmjohn 12y ago
var b = io.connect();
setInterval(function() {"00001001".split('').forEach(function(n) { b.emit('input',n); });},10)
I found it interesting to see how hard I had to hit the server to a.) get all my requests in before another person's request gets in the middle - and b.) have my 8 bits (or however many I was sending, didn't have much luck past 40 bits) occur at the start of on ascii character - as opposed to having it be off by n bits that previously were on the stack.
Thankfully websockets/socket.io ensures ordering so I didn't have to worry about them becoming unordered like I would if it was using basic http requests.