[gnutls-help] DTLS Handshaking with multiple clients
nmav at gnutls.org
Fri Apr 4 22:28:34 CEST 2014
On Fri, 2014-04-04 at 10:42 -0700, Stephen Birarda wrote:
> Adding DTLS to an event driven server-client architecture. I have Qt
> signal me when there is data to read on the DTLS socket and then hand
> that off to gnutls when appropriate.
> In the process of handshaking with a client, if the server is
> expecting another packet from the client it tries to pull from the
> socket again during the handshake process. When there are multiple
> clients connecting simultaneously, sometimes this causes the server to
> drop a handshake packet from another client on the floor, since the
> pull looks at the sending sockaddr and sees that it does not match the
> expected sender for the session.
Most probably you'll need a multiplexer in the read function that will
cache and send the appropriate data to the appropriate session. I
haven't really thought whether that could be easily made part of gnutls.
If you have any nice suggestion let me know.
More information about the Gnutls-help