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 09:40:28 -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> <031222CBCF33214AB2EB4ABA279428A30140C1ACA37B at SJCPMAILBOX01 dot citrite dot net> <20130412155606 dot GF11358 at calimero dot vinschen dot de>
>
> Too bad. I don't know the DTLS protocol, but isn't it possible to do the server
> part with a single UDP socket? If you keep track of the already connected
> clients, you know if the just incoming packet is a connected or connecting client,
> and then you can use different threads to handle the packet further.
>
>
> Corinna
>
Corinna, I suppose that it would be possible with a different API. The API
that OpenSSL provides makes it rather difficult. A DTLS session is "served" by a BIO
object that has a dedicated socket underneath it. I am not aware whether a workaround
is possible. May be application can replace that BIO with something "artificial" but
I am not sure that that's possible.
The same problem happens even with "plain" UDP when many clients (thousands)
are talking to the same single UDP port (for example, a TURN server). The workaround would be
to create an extra application layer on top of sockets layer to differentiate packet "streams"
by their remote address. With POSIX behavior, such a layer is not necessary.
Oleg