kazu-yamamoto / quic

IETF QUIC library in Haskell
BSD 3-Clause "New" or "Revised" License
91 stars 13 forks source link

Switching the connected socket model to the unconnected socket model #65

Closed kazu-yamamoto closed 3 months ago

kazu-yamamoto commented 3 months ago

Currently the connected socket model is adopted for the performance reasons, that is, UDP packets are dispatched in the kernel. The connected socket model works if NAT rebinding happens after a connection is created. Unfortunately, it appeared that some NATs rebind during connection establishment. There is no workarounds for this kind of NATs with the connected socket model.

So, I'm planning to switch to the unconnected socket model which uses sentTo and recvFrom in the UDP standard way. Benefits of the unconnected socket model:

Brawbacks:

kazu-yamamoto commented 3 months ago

Currently, unconnected socket can be used for receiving of the Windows server and receiving/sending of any clients.

kazu-yamamoto commented 3 months ago

todo:

kazu-yamamoto commented 3 months ago

Done!