![tunnelblick waiting for server response tunnelblick waiting for server response](https://www.wizcase.com/wp-content/uploads/2021/02/EN-ExpressVPN-Refund-Approved-Over-Live-Chat-With-Money-Back-Guarantee-English-autoresized41reY.png)
Android should then follow with an acknowledgement of that transaction (or alternatively a NAK for a rejection). The server should receive the files, create a transaction record and send that as the response back to Android.
![tunnelblick waiting for server response tunnelblick waiting for server response](https://cs.hofstra.edu/docs/images/tunnelblick_waiting.png)
In the above example I've added a #id unique identifier for the transaction. Here is an example of Android uploading a file with two way acknowledgment. What you are asking about is a type of handshaking exchange between the client and server, and it can be performed with a basic ACK/NAK exchange. If the transaction is dependant upon the Android client acknowledgment than this is call ACK/NAK communication.ĪCK (acknowledgment) and NAK (negative-acknowledgment) are used to tell the other-side the result of a request. A transaction has been requested by the Android client, and the Server has to perform the transaction. This falls under the basics of protocol communication. If the job id is not recognised then NOT-FOUND is the appropriate response.Įnd result is that the client can always make a sensible action when the network is lost and recovered, and likewise the server can always process requests from the client sensibly If its called before the results are available, then the response could be a NO-CONTENT response so the client knows that the server recognises the job id but does not have the content yet. This call can be repeated as often as needed to get the results. The client gets the results of the request from the results URL. Duplicated requests are handled simply by returning the same job ID to the client. From a servers perspective client request id's need to be cached for a few minutes, in-case the client sends duplicated requests. From a clients perspective, if this response does not occur, then the request needs to be resent. Using HTTP post to send a request to the server, using a unique client request id - and have the server respond with the job ID. The great thing about HTTP is that its fairly easy to solve all of these issues. How does the client know where to get the transaction results from?.How does the server detect repeat requests from the client when the server successfully received the first request?.How do you resend a transaction request that the client believes has not been received properly?.How do both sides know that the transaction request has been successfully received?.This is a fairly common problem with asynchronous transactions, and falls into several parts.