BIO_socket

Create a socket with optional BIO_SOCK_* behaviour flags applied.

Synopsis

Declared in <openssl/bio.h>

int
BIO_socket(
    int domain,
    int socktype,
    int protocol,
    int options);

Return Value

New socket file descriptor on success, or -1 on failure.

Parameters

NameDescription
domainAddress family (for example AF_INET).
socktypeSocket type (for example SOCK_STREAM).
protocolProtocol number, or 0 for the default for socktype.
optionsBitmask of BIO_SOCK_* flags (for example BIO_SOCK_NONBLOCK).