Import OpenSSL-0.9.8i.
[dragonfly.git] / crypto / openssl-0.9.7d / doc / ssl / SSL_get_fd.pod
bloba3f76259316f554924b1191646f1525849d42e80
1 =pod
3 =head1 NAME
5 SSL_get_fd - get file descriptor linked to an SSL object
7 =head1 SYNOPSIS
9  #include <openssl/ssl.h>
11  int SSL_get_fd(SSL *ssl);
12  int SSL_get_rfd(SSL *ssl);
13  int SSL_get_wfd(SSL *ssl);
15 =head1 DESCRIPTION
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.
23 =head1 RETURN VALUES
25 The following return values can occur:
27 =over 4
29 =item -1
31 The operation failed, because the underlying BIO is not of the correct type
32 (suitable for file descriptors).
34 =item E<gt>=0
36 The file descriptor linked to B<ssl>.
38 =back
40 =head1 SEE ALSO
42 L<SSL_set_fd(3)|SSL_set_fd(3)>, L<ssl(3)|ssl(3)> , L<bio(3)|bio(3)>
44 =cut