Create a TCP socket with SO_REUSEADDR and SO_REUSEPORT enabled.
Use the returned fd to create a net.Server:
const fd = createReuseportFd(9229, '127.0.0.0');
const server = require('net').createServer();
server.listen({ fd }, () => { console.log('listen() successfully') })
Return a fd binds to the address.
Generated using TypeDoc
Close a fd.
Note that you don't need to manually close fd that is listened by net.Server.