SSL_CTX_set_read_ahead.pod 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_set_read_ahead, SSL_CTX_get_read_ahead,
  4. SSL_set_read_ahead, SSL_get_read_ahead,
  5. SSL_CTX_get_default_read_ahead
  6. - manage whether to read as many input bytes as possible
  7. =head1 SYNOPSIS
  8. #include <openssl/ssl.h>
  9. void SSL_set_read_ahead(SSL *s, int yes);
  10. int SSL_get_read_ahead(const SSL *s);
  11. SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes);
  12. long SSL_CTX_get_read_ahead(SSL_CTX *ctx);
  13. long SSL_CTX_get_default_read_ahead(SSL_CTX *ctx);
  14. =head1 DESCRIPTION
  15. SSL_CTX_set_read_ahead() and SSL_set_read_ahead() set whether we should read as
  16. many input bytes as possible (for non-blocking reads) or not. For example if
  17. B<x> bytes are currently required by OpenSSL, but B<y> bytes are available from
  18. the underlying BIO (where B<y> > B<x>), then OpenSSL will read all B<y> bytes
  19. into its buffer (providing that the buffer is large enough) if reading ahead is
  20. on, or B<x> bytes otherwise. The parameter B<yes> or B<m> should be 0 to ensure
  21. reading ahead is off, or non zero otherwise.
  22. SSL_CTX_set_default_read_ahead() is identical to SSL_CTX_set_read_ahead().
  23. SSL_CTX_get_read_ahead() and SSL_get_read_ahead() indicate whether reading
  24. ahead has been set or not.
  25. =head1 NOTES
  26. These functions have no impact when used with DTLS. The return values for
  27. SSL_CTX_get_read_head() and SSL_get_read_ahead() are undefined for DTLS. Setting
  28. B<read_ahead> can impact the behaviour of the SSL_pending() function
  29. (see L<SSL_pending(3)>).
  30. =head1 RETURN VALUES
  31. SSL_get_read_ahead() and SSL_CTX_get_read_ahead() return 0 if reading ahead is off,
  32. and non zero otherwise.
  33. =head1 SEE ALSO
  34. L<ssl(7)>, L<SSL_pending(3)>
  35. =head1 COPYRIGHT
  36. Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
  37. Licensed under the OpenSSL license (the "License"). You may not use
  38. this file except in compliance with the License. You can obtain a copy
  39. in the file LICENSE in the source distribution or at
  40. L<https://www.openssl.org/source/license.html>.
  41. =cut