1BIO_S_SOCKET(3)                     OpenSSL                    BIO_S_SOCKET(3)
2
3
4

NAME

6       BIO_s_socket, BIO_new_socket - socket BIO
7

SYNOPSIS

9        #include <openssl/bio.h>
10
11        const BIO_METHOD *BIO_s_socket(void);
12
13        BIO *BIO_new_socket(int sock, int close_flag);
14

DESCRIPTION

16       BIO_s_socket() returns the socket BIO method. This is a wrapper round
17       the platform's socket routines.
18
19       BIO_read_ex() and BIO_write_ex() read or write the underlying socket.
20       BIO_puts() is supported but BIO_gets() is not.
21
22       If the close flag is set then the socket is shut down and closed when
23       the BIO is freed.
24
25       BIO_new_socket() returns a socket BIO using sock and close_flag.
26

NOTES

28       Socket BIOs also support any relevant functionality of file descriptor
29       BIOs.
30
31       The reason for having separate file descriptor and socket BIOs is that
32       on some platforms sockets are not file descriptors and use distinct I/O
33       routines, Windows is one such platform. Any code mixing the two will
34       not work on all platforms.
35

RETURN VALUES

37       BIO_s_socket() returns the socket BIO method.
38
39       BIO_new_socket() returns the newly allocated BIO or NULL is an error
40       occurred.
41
43       Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
44
45       Licensed under the OpenSSL license (the "License").  You may not use
46       this file except in compliance with the License.  You can obtain a copy
47       in the file LICENSE in the source distribution or at
48       <https://www.openssl.org/source/license.html>.
49
50
51
521.1.1i                            2021-07-22                   BIO_S_SOCKET(3)
Impressum