Lynguistic
Lynguistic

Reputation: 141

C++ How to retrieve ACK from a TCP Socket (windows)

I have some issues getting information about the acknowledgement of a TCP connection.

I've implemented a basic TCP Socket Server (socket(), listen(), bind(), accept(), send()) using Windows sockets. The communication works fine but now I want to retrieve and observe the incoming acknowledgements of the TCP packet.

Does anyone knows how I can get this information programmatically?

Upvotes: 1

Views: 1884

Answers (1)

Ben
Ben

Reputation: 35613

If your application needs to know when the data is received, or even in the case of failure, how much was received, you need an application-level acknowledgement.

The TCP ACK does not belong to the Application layer, it is purely layer-4 book-keeping information. If layer7 needs an ACK you need to add one at layer 7.

Related, the same goes for keep-alives: Asyncsockets and "silent" disconnections

Upvotes: 1

Related Questions