BIO_nread

Consume up to num bytes from a memory BIO, returning an internal pointer.

Synopsis

Declared in <openssl/bio.h>

int
BIO_nread(
    BIO* bio,
    char** buf,
    int num);

Return Value

Number of bytes made available at *buf, or a negative value on error.

Parameters

NameDescription
bioMemory BIO to read from.
bufReceives a pointer into the BIO's internal buffer (valid until the next modify).
numMaximum number of bytes to consume.