----- Original Message ----- 
From: "Olia Kerzhner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 12:16 AM
Subject: Re: OpenSSL: threading question


> > > Do you agree that read/write from 2 different
> > threads
> > > is acceptable with plain SOCKETs?
> > It works on writes, not on reads.
> > Do the test, you will see. The behavior is
> > unpredictable on blocking and
> > non-blocking sockets.
> > It might work 99,9% of the time, it one threads
> > picks up the datas before
> > the other, in some cases you might end up with a
> > dead-lock.
> > Plus on writes, don't forget the Nagle algorithm,
> > you might have some weird
> > stuff happening.
> >
>
> Are you talking about 2 threads, when one only reads,
> and another only writes?   I know you can't have 2
> threads reading at the same time, or writing at the
> same time.
Ok, you should have mentionned that since the beginning :)
All Stephen and I were trying to tell you, was that in some cases using
SSL_read and SSL_write, you could end up having two threads reading from the
same SOCKET.

That's why I preconized some subclassing to "protect" the access to SSL_read
and SSL_write.

Fred.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to