[openssl-users] DTLS in multi-thread and concurrent connection acceptance environment

Anand Choubey sanandchoubey at yahoo.com
Mon Nov 27 14:50:32 UTC 2017


Hi,
OpenSSL version is 1.1.0e.
I am writing high-performance DTLS server which can accept thousands of connections concurrently.  
Originally, I decided, DTLSv1_listen would be called inside the listener thread, once DTLSv1_listen returns 1 i.e. successful, a new async socket will be created, it will be bound (using bind) and connected (using BIO_connect) with DTLSv1_listen returned address. This new socket will be passed to service thread, BIO_set_fd will set this fd and SSL_accept will be called from service thread to complete the remaining handshake and data exchange etc.
But behavior is not same as above, I have to call SSL_accept  after bind and connect inside the listen, where DTLS handshake is completed. If SSL_accept is not called then DTLSv1_listen is continuously called and always return 1 in listener thread. 
Could you please guide to resolve this issue or how to write multi-threaded dtls server where connection acceptance can be done inside the listener thread using DTLSv1_listen?
Thanks in Advance,Anand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20171127/d0243bbf/attachment.html>


More information about the openssl-users mailing list