Easy Port Scan?

I am setting up a series of console applications on a range of port numbers across different Linux servers, for redundancy. The client accesses a database which lists the domain names and corresponding port numbers for these console applications in random order (to balance the load).

I need to cycle through these domain name and port number records until I find the first one that responds (ideally they are all working!). I know how to PING a domain to see if it’s alive, but how can I easily and quickly do a port scan for the designated port?

I have heard of the NMAP tool, but I am not sure if there is an easier way. I would like it to be cross-platform (Windows, macOS and Linux), but am happy to use three different techniques, if necessary.

What about using TCPSocket.connect http://documentation.xojo.com/index.php/TCPSocket if you already know the port to test.

But you could be in this situation that the firewall blok it.

That is a great alternative, thank you. I was only thinking of solutions external to Xojo. I’ll try it.

Yes that works! I tried to connect to a standalone Xojo web app and it worked.