'how to send a tcp acknowledgement within a specific time interval

I am required to send a tcp acknowledgement to a message from a server within 2000ms, else the socket connection will be closed by the server. How do I ensure that I can send this acknowledgement before the socket closes?



Solution 1:[1]

You're asking about an application-level ack -- this is outside the scope of the TCP-level ack that (as others have said) happens automatically. You'll have to architect your server solution to ensure this happens; there's nothing you can do at the socket level that will guarantee that higher layers observe your real-time requirements.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mzimmers