[#BIO_get_accept_socket]
= BIO&lowbar;get&lowbar;accept&lowbar;socket
:mrdocs:

Create a listening TCP socket for `host&lowbar;port` (deprecated&semi; prefer BIO&lowbar;new&lowbar;accept)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
BIO&lowbar;get&lowbar;accept&lowbar;socket(
    char* host&lowbar;port,
    int mode);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

Accepted listening socket fd on success, or INVALID&lowbar;SOCKET &sol; &hyphen;1 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *host&lowbar;port*
| Host&colon;port string (or &quot;&colon;port&quot; &sol; &quot;port&quot;) describing the bind address&period;
| *mode*
| BIO&lowbar;BIND&lowbar;&ast; behaviour (for example BIO&lowbar;BIND&lowbar;REUSEADDR)&period;
|===


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