I have added SSL_pending after select call just to ensure that data is
even not present in SSL buffers, incase select returns no data.

Should i add the same login for SSL_ERROR_WANT_READ:
SSL_ERROR_WANT_WRITE and then do a SSL_read.

Please advice.

Regards,
Pavan

On Tue, May 12, 2009 at 8:00 PM, Sudarshan Soma <[email protected]> wrote:
> Hi All,
> This is a basic question. But can anyone please clarify if this is correct?
>
> These are the steps iam doing for a read on SSL socket for http requests.
>
> I ) wait on select call on  socket descriptor, until read hit occurs
> (on timeout param)
> 2)  read incrementally with SSL_read() from that SSL descriptor
> (or in other words - get all data from SSL buffers )
> 3) goto step1
>
>
> Without the select call, i am seeing that application gets blocked on
> SSL_read call.
>
> Should i call the first step,( calling select). It doesnt seem to hang,
> (which might be wrong since SSL buffering might result hanging select,
> if the data is stored in SSL buffers) .
> Also I dont see anywhere mentioned, that "select" has to be used, so
> please confirm if this is the right way to do it.
>
> I am using  OpenSSL 0.9.8i
>
> Please let me know if iam misssing something.
>
>
>
> Regards,
> Pavan.
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to