3 const net = require('net');
7 var server = net.Server(function (socket) {
9 socket.on('error', function () {
15 //server.maxConnections = 128;
19 var oldConnections, oldErrors;
21 setInterval(function () {
22 if (oldConnections != server.connections) {
23 oldConnections = server.connections;
24 console.log("SERVER %d connections: %d", process.pid, server.connections);
27 if (oldErrors != errors) {
29 console.log("SERVER %d errors: %d", process.pid, errors);