Receive HTTPS Post on a Desktop App?

I feel like this is a silly question but I’m asking it anyways!

Is there any magical way for a desktop (not web!) client to receive a post from an external source? (This is not the user entering data into a form in an HTMLfield.)

I’d like to set the desktop to be an endpoint for Amazon SNS but suspect it’s not possible…

I’ve n ever done it, but given you can write a TCP/IP server in XoJO and Amazon provide SDKs for scripting languages. I expect so, although it might take a big effort in R&D. Unless someone else has already been there.

Why would you suspect not? It looks very do-able.

https://docs.aws.amazon.com/sns/latest/dg/sns-http-https-endpoint-as-subscriber.html

i think you need this ssl socket
documentation.xojo.com/api/networking/sslsocket.html

Well, the problem is Amazon SNS (and other services) wants a URL to post too.

It’s of course not feasible to map domains to multiple desktop clients.

And as far as I’m aware, a desktop ‘server’ would only ever be able to publish itself as a local IP. At best you might get the IP of your router but not the individual client. (Futzing with the router is not feasible as this will be deployed to people with no tech skill.)

So the problem is

  1. What class would actually receive a POST? Sever socket serving up HTTPSocket?

  2. Can a desktop app have an external IP you can POST too?

Having read the documentation in a bit more detail, I’d say this service was not intended to be consumed by anything other than another service…

To make this work from a desktop, I’d for a start you need to be able to get a static IP address for the desktop and then build a web server to run on the desktop…

What about putting a REST server running on the Amazon side to interact with the SNS service and then access the REST service from the desktop. You can get an Amazon sever from about $3.5 per month?

Yes, that was my suspicion.

I think if I’m going down the route of the client polling, I may as well just setup an Amazon Bucket. Each client would read and write a text file containing the LastModified date to determine if anything is new on the server.

[quote=487255:@James Dooley]Having read the documentation in a bit more detail, I’d say this service was not intended to be consumed by anything other than another service…

Not necessarily - You can certainly use a Dynamic DNS Service (DDNS) to help ease of getting a static IP address
https://dyn.com/
https://www.noip.com/free

However you still have to deal with inbound firewall rulesets and/or port forwarding to get the inbound Internet sourced REST call into your private IP address no matter if you use DDNS or not.