The TCP three-way handshake (SYN, SYN-ACK, ACK) serves to establish connection parameters and synchronize sequence numbers between the two endpoints. The initial sequence numbers (ISNs) are exchanged during this handshake. Data exchange occurs after the handshake completes. UDP does not use a handshake. The server acknowledges data during the data transfer phase, not during the handshake.