How to continually listen to a port

My phone VOIP provider sends SMS messages to my system, but I can’t see them. They do NOT have an app for my service.

I can see the messages come to my system (Linux) on port 70 using the command:

gary@gary:~$ sudo nc -l 70

with the following result:

GET /?from=1XXXXXXXXXX&message=New+try HTTP/1.1
Accept: /
Accept-Encoding: gzip
Host: portman.no-ip.biz:70
Via: 1.1 o-phx-a1-f2-lnx-11 (squid/3.5.20)
X-Forwarded-For: 129.146.230.9
Cache-Control: max-age=0

I want to constantly monitor this port, and when data is received to print it to the screen. I have looked at several of the examples (as shown in similar forum posts) but have not been successful.

I have tried using the different sockets but have not been successful in retrieving any of the test texts I have sent.

Take a look at the ServerSocket example. It should be provide an example of what you require. Given you’re on Linux you should be ok. On macOS you need special permissions to listen on a port number below 1024.

I get a window telling me what socket it has connected too (I limited it to 70) but it never receives the messages…

When I monitor them in a shell, though, I do need an administrator password… is there a way to give the socket administrator (root) privileges for this operation?

Try testing by building the app and granting it admin privileges.

Hmmm… I was converting most of my stuff to web based, so I don’t have a current desktop license… The last desktop license I have was 2020, and I can’t get that version of Xojo to load…

I will have to either upgrade or try to convert this to a web app…

Linux is the same way, it must be launched with privileges to use a port less than 1024. That’s why you have to use sudo in conjunction with nc. For custom implementations, use something above that range. The request you’re receiving is a HTTP request, so I don’t expect there’s an actual reason to use a low port.

Yep… I ran Xojo as root and it works now… I will use a higher port number, thanks TIm.