]>
Commit | Line | Data |
---|---|---|
cc99526d RL |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
aafbe1cc | 5 | SSL_get_fd, SSL_get_rfd, SSL_get_wfd - get file descriptor linked to an SSL object |
cc99526d RL |
6 | |
7 | =head1 SYNOPSIS | |
8 | ||
9 | #include <openssl/ssl.h> | |
10 | ||
c3e64028 NL |
11 | int SSL_get_fd(const SSL *ssl); |
12 | int SSL_get_rfd(const SSL *ssl); | |
13 | int SSL_get_wfd(const SSL *ssl); | |
cc99526d RL |
14 | |
15 | =head1 DESCRIPTION | |
16 | ||
17 | SSL_get_fd() returns the file descriptor which is linked to B<ssl>. | |
18 | SSL_get_rfd() and SSL_get_wfd() return the file descriptors for the | |
19 | read or the write channel, which can be different. If the read and the | |
20 | write channel are different, SSL_get_fd() will return the file descriptor | |
21 | of the read channel. | |
22 | ||
23 | =head1 RETURN VALUES | |
24 | ||
25 | The following return values can occur: | |
26 | ||
27 | =over 4 | |
28 | ||
29 | =item -1 | |
30 | ||
31 | The operation failed, because the underlying BIO is not of the correct type | |
32 | (suitable for file descriptors). | |
33 | ||
34 | =item E<gt>=0 | |
35 | ||
36 | The file descriptor linked to B<ssl>. | |
37 | ||
38 | =back | |
39 | ||
40 | =head1 SEE ALSO | |
41 | ||
b97fdb57 | 42 | L<SSL_set_fd(3)>, L<ssl(7)> , L<bio(7)> |
cc99526d | 43 | |
e2f92610 RS |
44 | =head1 COPYRIGHT |
45 | ||
46 | Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. | |
47 | ||
48 | Licensed under the OpenSSL license (the "License"). You may not use | |
49 | this file except in compliance with the License. You can obtain a copy | |
50 | in the file LICENSE in the source distribution or at | |
51 | L<https://www.openssl.org/source/license.html>. | |
52 | ||
53 | =cut |