Software: Apache. PHP/5.6.40 uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24 uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) Safe-mode: OFF (not secure) /opt/cpanel/ea-openssl11/share/doc/openssl/html/man3/ drwxr-xr-x |
Viewing file: Select action/file-type:
NAMEBIO_s_secmem, BIO_s_mem, BIO_set_mem_eof_return, BIO_get_mem_data, BIO_set_mem_buf, BIO_get_mem_ptr, BIO_new_mem_buf - memory BIO
SYNOPSIS#include <openssl/bio.h> const BIO_METHOD *BIO_s_mem(void); const BIO_METHOD *BIO_s_secmem(void); BIO_set_mem_eof_return(BIO *b, int v) long BIO_get_mem_data(BIO *b, char **pp) BIO_set_mem_buf(BIO *b, BUF_MEM *bm, int c) BIO_get_mem_ptr(BIO *b, BUF_MEM **pp) BIO *BIO_new_mem_buf(const void *buf, int len);
DESCRIPTION
A memory BIO is a source/sink BIO which uses memory for its I/O. Data written to a memory BIO is stored in a BUF_MEM structure which is extended as appropriate to accommodate the stored data.
Any data written to a memory BIO can be recalled by reading from it. Unless the memory BIO is read only any data read from it is deleted from the BIO. Memory BIOs support If the BIO_CLOSE flag is set when a memory BIO is freed then the underlying BUF_MEM structure is also freed. Calling
NOTESWrites to memory BIOs will always succeed if memory is available: that is their size can grow indefinitely. Every write after partial read (not all data in the memory buffer was read) to a read write memory BIO will have to move the unread data with an internal copy operation, if a BIO contains a lot of data and it is read in small chunks intertwined with writes the operation can be very slow. Adding a buffering BIO to the chain can speed up the process. Calling Switching the memory BIO from read write to read only is not supported and can give undefined results including a program crash. There are two notable exceptions to the rule. The first one is to assign a static memory buffer immediately after BIO creation and set the BIO as read only. The other supported sequence is to start with read write BIO then temporarily
switch it to read only and call Calling Calling Calling
BUGSThere should be an option to set the maximum size of a memory BIO.
RETURN VALUES
EXAMPLESCreate a memory BIO and write some data to it: BIO *mem = BIO_new(BIO_s_mem()); BIO_puts(mem, "Hello World\n"); Create a read only memory BIO: char data[] = "Hello World"; BIO *mem = BIO_new_mem_buf(data, -1); Extract the BUF_MEM structure from a memory BIO and then free up the BIO: BUF_MEM *bptr; BIO_get_mem_ptr(mem, &bptr); BIO_set_close(mem, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */ BIO_free(mem);
COPYRIGHTCopyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html. |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0173 ]-- |