Closed sstativa closed 2 years ago
Thanks, I'll fix this when I get time. Also need to check UDP port availability.
Try this;
const net = require('net');
const socket = new net.Socket();
Decided to remove this function as it's hard to detect if the UDP port is available. Right now it uses TCP.
isPortOpen()
is broken, ex. socket isundefined
. But apart from this, there is a logic problem.resolve
would actually mean that port is "busy", andreject
would mean that the port is free and can be used by the script.