title: How to deal with missing/delayed server responses in synchronized requests?
body: <p>I have a client-server architecture, where the client sends synchronized requests to the server over a socket. The client resends the request regularly after a certain timeout (to prevent the client blocking the thread, in the case the request never reaches the server). After a certain number of tries the client continues (even if no response from the server).<br>
  However, in this scenario it could happen, that the server sends the response after the client continued, which would leave the client having wrong state information (since the client assumes that the request was never processed by the server).</p>
  How can I make sure, that the client can continue after a timeout-period, but at the same time assure that there's no state difference at server- and client-side?</p>