168651Skris=pod
268651Skris
368651Skris=head1 NAME
468651Skris
568651SkrisSSL_get_fd - get file descriptor linked to an SSL object
668651Skris
768651Skris=head1 SYNOPSIS
868651Skris
968651Skris #include <openssl/ssl.h>
1068651Skris
11160814Ssimon int SSL_get_fd(const SSL *ssl);
12160814Ssimon int SSL_get_rfd(const SSL *ssl);
13160814Ssimon int SSL_get_wfd(const SSL *ssl);
1468651Skris
1568651Skris=head1 DESCRIPTION
1668651Skris
1768651SkrisSSL_get_fd() returns the file descriptor which is linked to B<ssl>.
1868651SkrisSSL_get_rfd() and SSL_get_wfd() return the file descriptors for the
1968651Skrisread or the write channel, which can be different. If the read and the
2068651Skriswrite channel are different, SSL_get_fd() will return the file descriptor
2168651Skrisof the read channel.
2268651Skris
2368651Skris=head1 RETURN VALUES
2468651Skris
2568651SkrisThe following return values can occur:
2668651Skris
2768651Skris=over 4
2868651Skris
2968651Skris=item -1
3068651Skris
3168651SkrisThe operation failed, because the underlying BIO is not of the correct type
3268651Skris(suitable for file descriptors).
3368651Skris
3468651Skris=item E<gt>=0
3568651Skris
3668651SkrisThe file descriptor linked to B<ssl>.
3768651Skris
3868651Skris=back
3968651Skris
4068651Skris=head1 SEE ALSO
4168651Skris
4268651SkrisL<SSL_set_fd(3)|SSL_set_fd(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
4368651Skris
4468651Skris=cut
45