I'm trying to find a communication method between web application and desktop application on Windows PC. At the moment I have a group of applications written in C++ (MFC) for Windows desktop environment. They can communicate between each other using TCP sockets - locally or over LAN.
I'm thinking about creating simple web application (I want it to run on smartphones), which will be able to connect to the PC via internet and exchange information with it.
I don't have experience in web technologies at the moment, so possibly I'm looking in wrong direction completely, but here is my idea of it:
1. I need to write web application (HTML / Java) which will run in browser on any smartphone with internet connection. (like web page saved on local disk)
2. I need to write a 'server' application for Windows which will pass required data to the web app
3. I need to find a way of continuous communication between the 2.
After doing some research I think WebSockets are good solutions for it. I found few demo projects, and I played with them, but every time, I have the same problem: I can connect from browser to server locally or in LAN, but it doesn't connect when I try to use my external IP address. So then I read that routers (or ISPs) are blocking most ports, which probably is a reason of the problem. However forwarding ports and configuring routers is not practical for my solution - I would have to do it for every client.
So then I found that using Secure Websocket (wss) should help with dealing with routers and so on. I tried that, but still no joy.
So my question is: is the websocket right way of communication in this situation or should I look somewhere else?
Thanks in advance