const net = require("net"); const server = net.createServer((socket) => { socket.on("error", (error) => { if (error.code != "ECONNRESET") { throw error; } }); }); server.listen(4000);