BIO_gets

Read a line from a BIO into buf (NUL-terminated; strips trailing newline when present).

Synopsis

Declared in <openssl/bio.h>

int
BIO_gets(
    BIO* bp,
    char* buf,
    int size);

Return Value

Number of bytes read (excluding NUL), 0 on EOF, or a negative value on error.

Parameters

NameDescription
bpSource BIO.
bufDestination buffer.
sizeCapacity of buf in bytes.