server: make sure client id are released when unused

When clients disconnect, their tcp server should be shutdown and the id
released after a grace period.
This commit is contained in:
Roman Shtylman
2012-11-14 13:53:33 -05:00
parent b5830c3840
commit b605e9b823
2 changed files with 34 additions and 12 deletions

View File

@@ -123,6 +123,10 @@ var duplex = function(remote_host, remote_port, local_host, local_port) {
}, 1000);
});
internal.on('connect', function() {
console.log('connected to local server');
});
upstream.pipe(internal).pipe(upstream);
})();