On 27 Jun, Bill Rebey wrote:
> Each server has two threads per connection, one doing a blocking read on the
> local port, the other doing a blocking read on the SSL port. When data
> shows up at one, it is written to the other. It's very efficient and very
> compact, involves no polling, maximizes throughput, and very CPU friendly.
> Apparently, though, OpenSSL won't allow the thread that
> "reads-clear-and-writes-SSL" to write on the SSL that the other thread is in
> a blocking SSL_read on. I don't know why, but supposedly that limitation is
> real.
Well, if BIO is thread-safe, then you can just have two locks, an
inbound lock and an outbound lock.
SSL_read:
lock inbound lock
...
(in some BIO thing)
unlock inbound lock
recv()/read()
lock inbound lock
...
(back in SSL_read)
unlock inbound lock
return
SSL_write is similar, but for send()/write() and the outbound lock.
Taral
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]