This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: UDP/DTLS sockets communication pattern is broken in Cygwin
- From: Oleg Moskalenko <oleg dot moskalenko at citrix dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Fri, 12 Apr 2013 08:44:41 -0700
- Subject: RE: UDP/DTLS sockets communication pattern is broken in Cygwin
- References: <031222CBCF33214AB2EB4ABA279428A30140C1ACA374 at SJCPMAILBOX01 dot citrite dot net> <20130411212115 dot GA1376 at ednor dot casa dot cgf dot cx> <031222CBCF33214AB2EB4ABA279428A30140C1ACA378 at SJCPMAILBOX01 dot citrite dot net> <20130412114354 dot GC11358 at calimero dot vinschen dot de>
>
> However, I think I found a workaround on the application level.
> Apparently all packets sent to a specific address are sent to the first socket
> which has been bound to the address. If that socket has been closed, the next in
> line gets the packets (unless it has been connected and the sender is not the
> connected address). So what I did was this:
>
> Before starting step 14, I created a third socket, which then replaced the server
> socket:
Thank you, Corinna, for the reply and for the idea.
Unfortunately, the workaround will work well only in the case of a single client.
In the multiple clients scenario, it will create a sort of race condition:
1) some packets already scheduled by OS to the "original" packet will be lost;
2) some packets delivered in between the sockets destruction/creation will be wrongly rejected.
But this is better than nothing. I'll think whether we can live with it.
Regards,
Oleg