SSL_get_fd.pod 1.2 KB

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