[#BIO_sock_info]
= BIO&lowbar;sock&lowbar;info
:mrdocs:

Query socket metadata into a BIO&lowbar;sock&lowbar;info&lowbar;u union&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BIO&lowbar;sock&lowbar;info(
    int sock,
    xref:BIO_sock_info_type.adoc[BIO&lowbar;sock&lowbar;info&lowbar;type] type,
    xref:BIO_sock_info_u.adoc[BIO&lowbar;sock&lowbar;info&lowbar;u]* info);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sock*
| Connected or bound socket descriptor&period;
| *type*
| Information type to retrieve (for example BIO&lowbar;SOCK&lowbar;INFO&lowbar;ADDRESS)&period;
| *info*
| Output union&semi; for BIO&lowbar;SOCK&lowbar;INFO&lowbar;ADDRESS, `info&hyphen;&gt;addr` receives a BIO&lowbar;ADDR&ast;&period;
|===


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