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