ylliX - Online Advertising Network
Vertex AI - Antrophic and Mistral models: Why does it require Imegen access?

Node js: choosing outgoing port (net socket)


Is there any way to specify my outgoing port when connecting to a remote socket with net socket, rather than the random port defined by the OS.

const host = "127.0.0.1";
const port = 5000;

const client = net.createConnection(port, host, () => {
    console.log("Connected");
});

To connect to this server, let’s say I want to also use 5000 as my outgoing port too…



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *