BIO_new_dgram

Create a datagram (UDP-style) BIO wrapping an existing socket descriptor.

Synopsis

Declared in <openssl/bio.h>

BIO*
BIO_new_dgram(
    int fd,
    int close_flag);

Return Value

Newly allocated datagram BIO, or NULL on failure.

Parameters

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