This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: UDP/DTLS sockets communication pattern is broken in Cygwin



> 
> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]