[#BIO_new_dgram]
= BIO&lowbar;new&lowbar;dgram
:mrdocs:

Create a datagram (UDP&hyphen;style) BIO wrapping an existing socket descriptor&period;

== Synopsis

Declared in `&lt;openssl&sol;bio&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BIO.adoc[BIO]*
BIO&lowbar;new&lowbar;dgram(
    int fd,
    int close&lowbar;flag);
----

== Return Value

Newly allocated datagram BIO, or NULL on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *fd*
| Socket file descriptor to wrap&period;
| *close&lowbar;flag*
| BIO&lowbar;CLOSE to close `fd` on BIO&lowbar;free(), or BIO&lowbar;NOCLOSE&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
