Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
NAME
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 BIOSYNOPSIS
#include <openssl/bio.h>BIO_s_mem(void);
BIO_set_mem_eof_return(BIO *b, int v);
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_new_mem_buf(const void *buf, int len);
DESCRIPTION
BIO_s_mem() returns the memory BIO method function.RETURN VALUES
BIO_s_mem() returns a pointer to a static object.EXAMPLES
Create a memory BIO and write some data to it:BIO *mem = BIO_new(BIO_s_mem()); BIO_puts(mem, "Hello World\n");
char data[] = "Hello World"; BIO *mem; mem = BIO_new_mem_buf(data, -1);
BUF_MEM *bptr; BIO_get_mem_ptr(mem, &bptr); /* Make sure BIO_free() leaves BUF_MEM alone. */ BIO_set_close(mem, BIO_NOCLOSE); BIO_free(mem);