File: //usr/local/openssl/man/man3/SSL_set_read_ahead.3
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "SSL_CTX_set_read_ahead 3"
.TH SSL_CTX_set_read_ahead 3 2019-12-20 1.0.2u OpenSSL
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
SSL_CTX_set_read_ahead, SSL_CTX_set_default_read_ahead, SSL_CTX_get_read_ahead,
SSL_CTX_get_default_read_ahead, SSL_set_read_ahead, SSL_get_read_ahead
\&\- manage whether to read as many input bytes as possible
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
\& #include <openssl/ssl.h>
\&
\& int SSL_get_read_ahead(const SSL *s);
\& void SSL_set_read_ahead(SSL *s, int yes);
\&
\& #define SSL_CTX_get_default_read_ahead(ctx)
\& #define SSL_CTX_set_default_read_ahead(ctx,m)
\& #define SSL_CTX_get_read_ahead(ctx)
\& #define SSL_CTX_set_read_ahead(ctx,m)
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
\&\fBSSL_CTX_set_read_ahead()\fR and \fBSSL_set_read_ahead()\fR set whether we should read as
many input bytes as possible (for non-blocking reads) or not. For example if
\&\fBx\fR bytes are currently required by OpenSSL, but \fBy\fR bytes are available from
the underlying BIO (where \fBy\fR > \fBx\fR), then OpenSSL will read all \fBy\fR bytes
into its buffer (providing that the buffer is large enough) if reading ahead is
on, or \fBx\fR bytes otherwise. The parameter \fByes\fR or \fBm\fR should be 0 to ensure
reading ahead is off, or non zero otherwise.
.PP
SSL_CTX_set_default_read_ahead is a synonym for SSL_CTX_set_read_ahead, and
SSL_CTX_get_default_read_ahead is a synonym for SSL_CTX_get_read_ahead.
.PP
\&\fBSSL_CTX_get_read_ahead()\fR and \fBSSL_get_read_ahead()\fR indicate whether reading
ahead has been set or not.
.SH NOTES
.IX Header "NOTES"
These functions have no impact when used with DTLS. The return values for
\&\fBSSL_CTX_get_read_head()\fR and \fBSSL_get_read_ahead()\fR are undefined for DTLS.
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
SSL_get_read_ahead and SSL_CTX_get_read_ahead return 0 if reading ahead is off,
and non zero otherwise.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBssl\fR\|(3)