BIO_accept

Accept a connection on a listening socket and return peer host:port text (deprecated).

Synopsis

Declared in <openssl/bio.h>

[[deprecated]]
int
BIO_accept(
    int sock,
    char** ip_port);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

Accepted socket fd on success, or -1 on error.

Parameters

NameDescription
sockListening socket fd from BIO_get_accept_socket().
ip_portReceives an allocated "host:port" string for the peer; free with OPENSSL_free().