Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simultaneous TCP Open

I am implementing "simultaneous TCP Open".That means both peer will try to connect each other at the same time. I confused whether listen is rquired or not in this case.

or tell me the sequence of socket need to be called for each client.

I am implementing this for TCp hole Punching.

thanks,

like image 443
Vikram Ranabhatt Avatar asked Jan 01 '26 08:01

Vikram Ranabhatt


1 Answers

From Wikipedia's article on TCP hole punching:

Because both parties are connection TO each other (e.g. 2 x CONNECT(), no LISTEN(), ACCEPT(), etc.) to generate OUTBOUND traffic there is however a problem with:

TCP Sequence numbers

Acknowledgment numbers

The required state is just like after the three-way-handshake: Each host must have an acknowledge number == other sequence number + 1. This is achieved through Sequence and Acknowledgement Number coordination.

listen() is not needed. The sequence depends on what is available.

like image 182
Andrew Sledge Avatar answered Jan 03 '26 21:01

Andrew Sledge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!