Hi, I need to explain some thing about this errors. I`m not good at english and 
I`m worried about misunderstanding.

I have multithread system. Some threads are writing to BIOs and one is waiting 
on select function and read the responses of servers.
For this, I must use a non blocking bio. And I`m not sure what to do, if i have 
some error in writing or reading. I write here my opinion what to do. Please 
correct me, if I`m wrong.

WRITING:
  when BIO_write() returns me SSL_ERROR_WANT_READ, it`s because I have in SSL 
buffer some data for reading (perhaps the message from server) so I need to 
call the BIO_read function. But somewhere I read, that this error is thrown, 
when the rehandshaking is making, so I need only wait a moment and then try 
again. Is right the first case or second.
 I can have the SSL_ERROR_WANT_WRITE too. It means that the buffer is full and 
I can`t write there the whole record. Is it right to wait on select() and try 
it again when the select tells me, the socket is ready to write?

READING:
  SSL_ERROR_WANT_READ - its possible I have some data in network buffer, but 
non in SSL buffer, so I must wait a while. Because the SSL hasn`t whole record.
 SSL_ERROR_WANT_WRITE - rehandshaking, only wait a moment and try it again


Are the actions I do after receive some of this errors corect, or am I totaly 
misunderstud??
Thanks for answer

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

Reply via email to