Reputation: 335
Here is the scenario:
Client #1 put some info to the server (using an HTTP request)
Server keeps that info and wait for client #2 to put his info too. Time between client #1 and client #2 calls can be from a couple of seconds to several hours.
When client #2 put his info to server, server return client #1 infos to client #2 through the HTTP request.
Server then need to return the client #2 infos to client #1.
How can I return client #2 infos to client #1, assuming that client #1 cannot be directly reached (NAT, firewall) and that the time between the two calls can be very long?
I would like to avoid client #1 to regularly poke the server... Clients are not using a web browser to connect to the server but a custom application where we have total control
Upvotes: 0
Views: 472
Reputation: 597941
The client will have to poke the server periodically, if the client closes its connection anytime between steps 1 and 4. Otherwise, let the client keep its initial connection open waiting for a server-side push of the data, even if it takes hours, then close the connection once the data arrives.
Upvotes: 2