Junior — Middle
Are the saved data transmitted when the client disconnects from the server during data transfer over TCP protocol?
sobes.tech AI
Answer from AI
When a TCP connection is broken, data that has already been sent and acknowledged (ACKed) by the receiver is considered delivered. If the connection is broken before acknowledgment, these data may be lost.
TCP guarantees data delivery using acknowledgment mechanisms and retransmission. If the connection is broken, unacknowledged data will not be delivered, and the application may receive an error or timeout.
Therefore, sent and acknowledged data is transmitted, but unacknowledged data is not.