]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/BIO_s_socket.pod
Implement EVP_MAC_do_all_ex()
[thirdparty/openssl.git] / doc / man3 / BIO_s_socket.pod
CommitLineData
6dcbaf58
DSH
1=pod
2
3=head1 NAME
4
8eec1389 5BIO_s_socket, BIO_new_socket - socket BIO
6dcbaf58
DSH
6
7=head1 SYNOPSIS
8
9 #include <openssl/bio.h>
10
04f6b0fd 11 const BIO_METHOD *BIO_s_socket(void);
6dcbaf58 12
6dcbaf58
DSH
13 BIO *BIO_new_socket(int sock, int close_flag);
14
15=head1 DESCRIPTION
16
bace2124 17BIO_s_socket() returns the socket BIO method. This is a wrapper
6dcbaf58
DSH
18round the platform's socket routines.
19
b055fceb 20BIO_read_ex() and BIO_write_ex() read or write the underlying socket.
6dcbaf58
DSH
21BIO_puts() is supported but BIO_gets() is not.
22
23If the close flag is set then the socket is shut down and closed
24when the BIO is freed.
25
6dcbaf58
DSH
26BIO_new_socket() returns a socket BIO using B<sock> and B<close_flag>.
27
28=head1 NOTES
29
30Socket BIOs also support any relevant functionality of file descriptor
31BIOs.
32
33The reason for having separate file descriptor and socket BIOs is that on some
34platforms sockets are not file descriptors and use distinct I/O routines,
35Windows is one such platform. Any code mixing the two will not work on
36all platforms.
37
38=head1 RETURN VALUES
39
40BIO_s_socket() returns the socket BIO method.
41
6dcbaf58
DSH
42BIO_new_socket() returns the newly allocated BIO or NULL is an error
43occurred.
44
e2f92610
RS
45=head1 COPYRIGHT
46
47Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
48
4746f25a 49Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
50this file except in compliance with the License. You can obtain a copy
51in the file LICENSE in the source distribution or at
52L<https://www.openssl.org/source/license.html>.
53
54=cut