[#BIO_socket]
= BIO&lowbar;socket
:mrdocs:

Create a socket with optional BIO&lowbar;SOCK&lowbar;&ast; behaviour flags applied&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BIO&lowbar;socket(
    int domain,
    int socktype,
    int protocol,
    int options);
----

== Return Value

New socket file descriptor on success, or &hyphen;1 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *domain*
| Address family (for example AF&lowbar;INET)&period;
| *socktype*
| Socket type (for example SOCK&lowbar;STREAM)&period;
| *protocol*
| Protocol number, or 0 for the default for `socktype&period;`
| *options*
| Bitmask of BIO&lowbar;SOCK&lowbar;&ast; flags (for example BIO&lowbar;SOCK&lowbar;NONBLOCK)&period;
|===


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