ethand91 / mediasoup3-record-demo

Simple Record Demo using Mediasoup 3 and GStreamer
197 stars 93 forks source link

isPortOpen from port.js is broken #18

Closed sstativa closed 2 years ago

sstativa commented 4 years ago

isPortOpen() is broken, ex. socket is undefined. But apart from this, there is a logic problem. resolve would actually mean that port is "busy", and reject would mean that the port is free and can be used by the script.

ethand91 commented 4 years ago

Thanks, I'll fix this when I get time. Also need to check UDP port availability.

KiPSOFT commented 3 years ago

Try this;

const net = require('net');
const socket = new net.Socket();
ethand91 commented 2 years ago

Decided to remove this function as it's hard to detect if the UDP port is available. Right now it uses TCP.