[openssl-users] how to complete non-blocking IO with multiple worker threads ?
Milind Changire
milindchangire at gmail.com
Tue Nov 21 14:13:15 UTC 2017
Environment: Linux (Fedora/RHEL)
I have a client server implementation with the server waiting for
connections via an epoll fd. Many worker threads epoll_wait( ) on the
epoll fd.
This implementation has the static thread-id and thread-locking callbacks
registered to handle multiple threads to use the SSL API. However, the
current implementation also spawns a dedicated thread to SSL_accept(
)/SSL_connect( )/SSL_read( )/SSL_write( ) with SSL connections and works
perfectly.
I want to discard the dedicated thread implementation for SSL and use the
worker threads waiting in epoll_wait( ) to service the non-blocking IO
requests as is done for non-SSL communication, using the SSL API of course.
Can this be done ?
So, is there a way that such a multi-threaded non-blocking IO client/server
application can complete the IO via various worker threads when a
WANT_READ/WANT_WRITE is returned by SSL_get_error( )
Also, can WANT_READ/WANT_WRITE returned from SSL_accept( )/SSL_connect( )
also be serviced with non-blocking IO and via different worker threads ?
I couldn't find anything pertaining to this in the archives. Please point
me to one if I missed it.
Regards,
Milind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20171121/f454d82e/attachment.html>
More information about the openssl-users
mailing list