Moray Goodwin wrote:
>
> At 11:49 10/02/99 -0500, Jeff Dubrule wrote:
> >On Wed, Feb 10, 1999 at 02:35:03PM -0000, Carl Burnside wrote:
> >> Is it possible to use SSL communications calls in a non-blocking
> fashion? I
(snip)
> Is there an 'official' way to check for buffered read-ahead data,
> before making a call to select() ?
>
> regards
>
> Moray
Maybe this help you, I have not test it....
>From the SSLeay Programmer Reference
( http://www.psy.uq.oz.au/~ftp/Crypto/ssl.html#HDR14 )
accesed from http://www.openssl.org/related/
......
5.10 Set read-ahead
By default, SSL does not read more data from the network than is
requested. However if you are not using select() to determine the
availability of data,
you can get a significant throughput improvement by simply switch
read-ahead on. See SSL_pending() for a mechanism for determining if
there is more
data available.
void SSL_set_read_ahead(SSL *s, int yes)
5.11 Get read-ahead
To find out the current setting of the read-ahead flag:
int SSL_get_read_ahead(SSL *s)
5.12 Check for more data
When using read-ahead mode you cannot rely on select() to determine if
more data is available as SSL_read() may have already read data off the
wire
that has not been read by the caller (the caller will get this data
returned in future calls to SSL_read()).
int SSL_pending(SSL *s)
.......
By the way
Take a look at s_client.c s_server.c with the option -nbio
Hope this help
Paco Garcia
(Att: no-spam email)
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]