Removed socket delays to reduce latency

This commit is contained in:
Matt Bell 2013-02-01 17:33:03 -08:00
parent 4dcd961d5e
commit 6442e8d6b0
2 changed files with 5 additions and 0 deletions

View file

@ -22,6 +22,9 @@ Client.prototype.setSocket = function(socket) {
var self = this;
self.socket = socket;
var incomingBuffer = new Buffer(0);
self.socket.setNoDelay();
self.socket.on('data', function(data) {
if (self.encryptionEnabled) data = new Buffer(self.decipher.update(data), 'binary');
incomingBuffer = Buffer.concat([incomingBuffer, data]);