I am relatively new to networking. I am doubting what happens when the sender sends more data than the advertised window by the receiver. I mean that the receiver advertises the window size based of the time available buffer it might change (both increase or decrease) due to any condition, or the sender can ignore the window size and yet send the packet with a bigger size. In such case will there be partial acceptance (i.e. take as much data as the buffer can fit in and send an acknowledgment of the rest of the data); although this possibility seems unreasonable to me as in this case integrity maintenance protocols like TLS may break. Or the whole packet is dropped.
Depending on the host implementation, two outcomes are possible:
- (strict) since the received SEQ is outside the receive window, the sender is assumed to be out of sync and the connection is RST
- (more tolerant) the excess data is simply dropped and ignored - the sender needs to resend
In no case does the receiver ACK data it can't deliver to the application. It's also highly unreasonable to buffer and ACK excess data as that would effectively negate TCP's flow and congestion control.