On Mon, 19 Apr 2010 11:09:33 -0700
"Jeremy Farrell" <jfarr...@pillardata.com> wrote:

> That's the usual way to handle significant numbers of connections.
> For many programs handling a small number of connections, two threads
> per connection is the normal approach. It's simpler, and much easier
> to port between OSes. Horses for courses.

I think that depends on simplicity (or complexity) of your application
and how much shared data you have. Having two I/O threads (one for
reading, one for writing) for each socket, means you need to use
locking and condition variables to signal the start/completion of I/O.
Making sure that you test the right predicates in a proper way, and
avoid race conditions, can be quite tricky.

A simple call to poll() might be much easier.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to