[#BIO_accept]
= BIO&lowbar;accept
:mrdocs:

Accept a connection on a listening socket and return peer host&colon;port text (deprecated)&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;accept(
    int sock,
    char** ip&lowbar;port);
----

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

Accepted socket fd on success, or &hyphen;1 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *sock*
| Listening socket fd from BIO&lowbar;get&lowbar;accept&lowbar;socket()&period;
| *ip&lowbar;port*
| Receives an allocated &quot;host&colon;port&quot; string for the peer&semi; free with OPENSSL&lowbar;free()&period;
|===


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