BIO_CONNECT - Online Linux Manual PageSection : 3ossl
Updated : 2022-03-15
Source : 3.0.2
Note : OpenSSL

NAMEBIO_socket, BIO_bind, BIO_connect, BIO_listen, BIO_accept_ex, BIO_closesocket − BIO socket communication setup routines

SYNOPSIS​ #include <openssl/bio.h> ​ ​ int BIO_socket(int domain, int socktype, int protocol, int options); ​ int BIO_bind(int sock, const BIO_ADDR *addr, int options); ​ int BIO_connect(int sock, const BIO_ADDR *addr, int options); ​ int BIO_listen(int sock, const BIO_ADDR *addr, int options); ​ int BIO_accept_ex(int accept_sock, BIO_ADDR *peer, int options); ​ int BIO_closesocket(int sock);

DESCRIPTIONBIO_socket() creates a socket in the domain domain, of type ​socktype and protocol. Socket options are currently unused, but is present for future use. BIO_bind() binds the source address and service to a socket and may be useful before calling BIO_connect(). The options may include ​BIO_SOCK_REUSEADDR, which is described in FLAGS below. BIO_connect() connects sock to the address and service given by ​addr. Connection options may be zero or any combination of ​BIO_SOCK_KEEPALIVE, BIO_SOCK_NONBLOCK and BIO_SOCK_NODELAY. The flags are described in FLAGS below. BIO_listen() has sock start listening on the address and service given by addr. Connection options may be zero or any combination of BIO_SOCK_KEEPALIVE, BIO_SOCK_NONBLOCK, ​BIO_SOCK_NODELAY, BIO_SOCK_REUSEADDR and BIO_SOCK_V6_ONLY. The flags are described in FLAGS below. BIO_accept_ex() waits for an incoming connections on the given socket accept_sock. When it gets a connection, the address and port of the peer gets stored in peer if that one is non-NULL. Accept options may be zero or BIO_SOCK_NONBLOCK, and is applied on the accepted socket. The flags are described in FLAGS below. BIO_closesocket() closes sock.

FLAGSBIO_SOCK_KEEPALIVE Enables regular sending of keep-alive messages. BIO_SOCK_NONBLOCK Sets the socket to nonblocking mode. BIO_SOCK_NODELAY Corresponds to TCP_NODELAY, and disables the Nagle algorithm. With this set, any data will be sent as soon as possible instead of being buffered until there's enough for the socket to send out in one go. BIO_SOCK_REUSEADDR Try to reuse the address and port combination for a recently closed port. BIO_SOCK_V6_ONLY When creating an IPv6 socket, make it only listen for IPv6 addresses and not IPv4 addresses mapped to IPv6. These flags are bit flags, so they are to be combined with the ​| operator, for example: ​ BIO_connect(sock, addr, BIO_SOCK_KEEPALIVE | BIO_SOCK_NONBLOCK);

RETURN VALUESBIO_socket() returns the socket number on success or INVALID_SOCKET (−1) on error. When an error has occurred, the OpenSSL error stack will hold the error data and errno has the system error. BIO_bind(), BIO_connect() and BIO_listen() return 1 on success or 0 on error. When an error has occurred, the OpenSSL error stack will hold the error data and errno has the system error. BIO_accept_ex() returns the accepted socket on success or ​INVALID_SOCKET (−1) on error. When an error has occurred, the OpenSSL error stack will hold the error data and errno has the system error.

SEE ALSOBIO_ADDR(3)

HISTORYBIO_gethostname(), BIO_get_port(), BIO_get_host_ip(), ​BIO_get_accept_socket() and BIO_accept() were deprecated in OpenSSL 1.1.0. Use the functions described above instead.

COPYRIGHTCopyright 2016−2020 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the License). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
0
Johanes Gumabo
Data Size   :   15,182 byte
man-BIO_listen.3osslBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 173,796
Visitor ID   :     :  
Visitor IP   :   3.145.55.25   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|B___IO_accept_ex.3ossl|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|B___IO_accept_ex.3ossl|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|B___IO_accept_ex.3ossl|43|br══─}─══|'br══─}─══ )         (htmlprn|149|B___IO_accept_ex.3ossl|43|'br══─}─══ |'br══─}─══ )