BIO_get_line

Read bytes until a newline or EOF, without requiring a trailing NUL in the source.

Synopsis

Declared in <openssl/bio.h>

int
BIO_get_line(
    BIO* bio,
    char* buf,
    int size);

Return Value

Number of bytes stored, 0 on EOF with no data, or a negative value on error.

Parameters

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