BIO_new_fd

Create a file-descriptor BIO wrapping an existing OS descriptor.

Synopsis

Declared in <openssl/bio.h>

BIO*
BIO_new_fd(
    int fd,
    int close_flag);

Return Value

Newly allocated fd BIO, or NULL on failure.

Parameters

NameDescription
fdFile descriptor to wrap.
close_flagBIO_CLOSE to close fd on BIO_free(), or BIO_NOCLOSE.