Permalink
Browse files

[minor] move socket changes to Peer instead of server

  • Loading branch information...
1 parent 2d070ac commit 68349d8d488e2678919739ca2b598379a87a62d2 @ecto committed Feb 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −0 lib/peer.js
  2. +0 −2 nucleus.js
View
@@ -16,6 +16,8 @@ var Peer = function (options) {
that.handleConnection(arguments);
}
);
+ this.$.setNoDelay(true); // disable write buffering
+ this.$.setKeepAlive(true, 1000);
}
/*
View
@@ -72,8 +72,6 @@ Nucleus.prototype.createServer = function () {
this.$ = net.createServer(function (socket) {
that.connectionHandler(socket);
});
- this.$.setNoDelay(true); // disable write buffering
- this.$.setKeepAlive(true, 1000);
this.$.listen(this.port, function () {
that.ee.emit('server.ready');
});

0 comments on commit 68349d8

Please sign in to comment.