- Original Message -
From: "David Schwartz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 9:34 PM
Subject: RE: OpenSSL: threading question
> Except that all but one processor would be sitting idle and if any piece
of
> your code
> > The irony is that on Windows, with IOCP, it's even more common to have
> > concurrent reads and writes to the same socket handled by different
> > threads.
> > IOCP throws read and write events into the same event queue because you
> > associate a socket with a completion port!
> IOCP ? Are y
- Original Message -
From: "David Schwartz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 11:39 AM
Subject: RE: OpenSSL: threading question
>
> > [I suspect (based on the all-caps spelling of SOCKET and the sample
>
- Original Message -
From: "Joseph Bruni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 8:58 AM
Subject: Re: OpenSSL: threading question
>
> On Jan 6, 2004, at 12:47 AM, David Schwartz wrote:
>
> >> In most cases
> [I suspect (based on the all-caps spelling of SOCKET and the sample
> code provided earlier) that Mr. Giudicelli speaks from a Windows
> perspective, which doesn't handle multiple processes very well, and
> certainly does not abstract tcp sockets into simple file descriptors
> the way unix does.
On Jan 6, 2004, at 12:47 AM, David Schwartz wrote:
In most cases multi threads and only one SOCKET don't really get
along.
I'm not sure why you'd say that. For TCP, reading and writing are
totally
independent. Using a pool of threads for I/O is quite common to protect
against ambush (when an op
> In any event if you end up having a MUTEX, you would be better
> off with only
> one thread accessing both queues.
Well that's what the mutex gives you.
> That would even allow you to implement a priority algo, which wouldn't be
> the case with a simple MUTEX. You could give more prior
reads and only one SOCKET don't really get along.
Frédéric Giudicelli
http://www.newpki.org
- Original Message -
From: "David Schwartz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 5:56 AM
Subject: RE: OpenSSL: threading question
> Right on !
>
> May I ask a silly question?
> Why would you do such a weird thing in the first place? (maybe we should
> have started from there) :)
Because you might have a design where you have a pool of I/O threads and a
queue of I/O jobs. Read jobs and write jobs might be thrown into
) considered
that libcrypto was in charge to initialize it.
I should have double-checked.
Frédéric Giudicelli
http://www.newpki.org
- Original Message -
From: "Joseph Bruni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 3:51 AM
Subject:
EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 3:51 AM
Subject: Re: OpenSSL: threading question
I'm glad this discussion happened about now. I, too, am implementing a
query/response system and I've been thinking about putting the read and
write cycles into
An excellent reference to OpenSSL programming can be found in the
O'Reilly book:
http://www.oreilly.com/catalog/openssl/index.html
Lot's of really good stuff here about common mistakes (like not
initializing mutexes...). The book was written for 0.9.6 with a few
references to some features in
I'm glad this discussion happened about now. I, too, am implementing a
query/response system and I've been thinking about putting the read and
write cycles into different threads.
My reason for wanting to do this would be to allow the server, which
sends the initial message, waits for a respons
- Original Message -
From: "Olia Kerzhner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 2:51 AM
Subject: Re: OpenSSL: threading question
> well, I think the orginal thinking behind this design
> was efficiency, we move a lot of
g
>
> - Original Message -
> From: "Olia Kerzhner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 06, 2004 1:18 AM
> Subject: Re: OpenSSL: threading question
>
>
> > Ok, I think we're on the same page now.
> Hello,
> does anyone know if it's valid to call SSL_write and
> SSL_read silmultaneously from two different threads?
Not for the same connection. Otherwise, yes.
DS
__
OpenSSL Project
TED]>
Sent: Tuesday, January 06, 2004 1:18 AM
Subject: Re: OpenSSL: threading question
> Ok, I think we're on the same page now. With
> Stephen's explanation and your last remark it clicked
> into place. Can't read from 2 threads at the same
> time, and SSL doesn
On Tue, Jan 06, 2004, Frédéric Giudicelli wrote:
>
> > I guess I'm trying to understand why using 2 threads
> > wouldn't work. Is it a bug? Is it by design -- where
> > is it documented? Do you just know it doesn't work
> > from experience? Do you think it would work if I used
> > 2 threads,
for not being quicker on the uptake!
--- Frédéric_Giudicelli <[EMAIL PROTECTED]> wrote:
> - Original Message -
> From: "Olia Kerzhner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 06, 2004 12:16 AM
> Subject: Re: OpenSSL
On Tue, Jan 06, 2004, Frédéric Giudicelli wrote:
> > Now that we have dynamic locks it would be possible to do things properly
> but
> > it hasn't been done yet.
> Has it been implemented for usual structs yet ? Because 0.9.7c it still uses
> those "ugly" global locks.
>
Not yet no. It isn't too
- 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
> > >
> Now that we have dynamic locks it would be possible to do things properly
but
> it hasn't been done yet.
Has it been implemented for usual structs yet ? Because 0.9.7c it still uses
those "ugly" global locks.
> That's been *reported* to work but I haven't tried it myself.
Well, I honestly see no
22 matches
Mail list logo