The receiver's ACK names the next byte it wants from the client stream.

highlighted = computed this step

ACK names the next byte wanted

The server receives the client payload and sends an ACK back. The ACK number names the next client byte the server wants.

ACK field=1003\text{ACK field}=1003
Receiver sends ACKA toy TCP data timeline shows the client data segment followed by the server ACK.Receiver sends ACKClientESTABLISHEDESTABLISHEDServerESTABLISHEDESTABLISHEDDATA hi seq=1001 ACK, PSHACK seq=5001 ACK

Data then acknowledgment

The timeline order is data first, ACK second. The ACK is a response to the bytes already received.

messages=2\text{messages}=2
Receiver sends ACKA toy TCP data timeline shows the client data segment followed by the server ACK.Receiver sends ACKClientESTABLISHEDESTABLISHEDServerESTABLISHEDESTABLISHEDDATA hi seq=1001 ACK, PSHACK seq=5001 ACK

The server's own sequence stays at its next byte

The server sends this pure ACK with sequence 5001. This toy ACK carries no payload bytes.

server seq=5001\text{server seq}=5001
Receiver sends ACKA toy TCP data timeline shows the client data segment followed by the server ACK.Receiver sends ACKClientESTABLISHEDESTABLISHEDServerESTABLISHEDESTABLISHEDDATA hi seq=1001 ACK, PSHACK seq=5001 ACK

Summary

The receiver's ACK points to the next client byte after hi.

next byte wanted=1003\text{next byte wanted}=1003
Receiver sends ACKA toy TCP data timeline shows the client data segment followed by the server ACK.Receiver sends ACKClientESTABLISHEDESTABLISHEDServerESTABLISHEDESTABLISHEDDATA hi seq=1001 ACK, PSHACK seq=5001 ACK