I am working on a protocol on top of UDP that is connection-oriented (just for learning). The three-way handshake used by for example TCP is simple:
- Client send SYN
- Server send SYN + ACK
- Client send ACK
however, any of these packages can get lost. How does TCP recover from errors in the initialization phase? What happens if step 1 never happens? Just resend the SYN, but what if the client never receives the SYN + ACK, then either the SYN + ACK got lost or the first SYN got lost. What if the last ACK never makes it, should the server just assume after some time that everything is alright? So many possibilities for errors :o