I can communicate with a web server over HTTP functions like get and post with no problem.
The algoritm works like this;
- I send a query with get
- Than start to listen
- If any data received, I read it.
I need to if I didnt send any request to server, how could I receive the data?
Because server starts the communication, and after the beginning I'm directing it.( send to server, and listen the response ...) The problem is server can send a request to start communication once a day, or once a week, or more.
In addition there may be many client such as me...
And if server wants to start communication, I have to reply quickly. ( just in seconds...)
How should I setup the algoritm?