SSL_alloc_buffers.pod 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. =pod
  2. =head1 NAME
  3. SSL_free_buffers, SSL_alloc_buffers - manage SSL structure buffers
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. int SSL_free_buffers(SSL *ssl);
  7. int SSL_alloc_buffers(SSL *ssl);
  8. =head1 DESCRIPTION
  9. SSL_free_buffers() frees the read and write buffers of the given B<ssl>.
  10. SSL_alloc_buffers() allocates the read and write buffers of the given B<ssl>.
  11. The B<SSL_MODE_RELEASE_BUFFERS> mode releases read or write buffers whenever
  12. the buffers have been drained. These functions allow applications to manually
  13. control when buffers are freed and allocated.
  14. After freeing the buffers, the buffers are automatically reallocated upon a
  15. new read or write. The SSL_alloc_buffers() does not need to be called, but
  16. can be used to make sure the buffers are pre-allocated. This can be used to
  17. avoid allocation during data processing or with CRYPTO_set_mem_functions()
  18. to control where and how buffers are allocated.
  19. =head1 RETURN VALUES
  20. The following return values can occur:
  21. =over 4
  22. =item 0 (Failure)
  23. The SSL_free_buffers() function returns 0 when there is pending data to be
  24. read or written. The SSL_alloc_buffers() function returns 0 when there is
  25. an allocation failure.
  26. =item 1 (Success)
  27. The SSL_free_buffers() function returns 1 if the buffers have been freed. This
  28. value is also returned if the buffers had been freed before calling
  29. SSL_free_buffers().
  30. The SSL_alloc_buffers() function returns 1 if the buffers have been allocated.
  31. This value is also returned if the buffers had been allocated before calling
  32. SSL_alloc_buffers().
  33. =back
  34. =head1 SEE ALSO
  35. L<SSL_free(3)>, L<SSL_clear(3)>,
  36. L<SSL_new(3)>, L<SSL_CTX_set_mode(3)>,
  37. L<CRYPTO_set_mem_functions>
  38. =head1 COPYRIGHT
  39. Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
  40. Licensed under the OpenSSL license (the "License"). You may not use
  41. this file except in compliance with the License. You can obtain a copy
  42. in the file LICENSE in the source distribution or at
  43. L<https://www.openssl.org/source/license.html>.
  44. =cut