{ socket.on('data', function(chunk) { console.log('net', chunk.toString()); }); }); net_server.listen(8080); // tls.Server var tls_server = require('tls').createServer(opts); tls_server.on('connection', function(socket) { socket.on('data', function(chunk) { console.log('tls', chunk.toString()); }); }); tls_server.listen(8081); // http.Server var http_server = require('http').createServer(); http_server.on('connection', function(socket) { socket.on('data', function(chunk) { console.log('http', chunk.toString()); }); }); http_server.listen(8082); // https.Server var https_server = require('https').createServer(opts); https_server.on('connection', function(socket) { socket.on('data', function(chunk) { console.log('https', chunk.toString()); }); }); https_server.listen(8083); Node APIの 土地勘を持つ