SSL_pending.pod 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. =pod
  2. =head1 NAME
  3. SSL_pending - obtain number of readable bytes buffered in an SSL object
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. int SSL_pending(const SSL *ssl);
  7. =head1 DESCRIPTION
  8. SSL_pending() returns the number of bytes which are available inside
  9. B<ssl> for immediate read.
  10. =head1 NOTES
  11. Data are received in blocks from the peer. Therefore data can be buffered
  12. inside B<ssl> and are ready for immediate retrieval with
  13. L<SSL_read(3)|SSL_read(3)>.
  14. =head1 RETURN VALUES
  15. The number of bytes pending is returned.
  16. =head1 BUGS
  17. SSL_pending() takes into account only bytes from the TLS/SSL record
  18. that is currently being processed (if any). If the B<SSL> object's
  19. I<read_ahead> flag is set (see
  20. L<SSL_CTX_set_read_ahead(3)|SSL_CTX_set_read_ahead(3)>), additional protocol
  21. bytes may have been read containing more TLS/SSL records; these are ignored by
  22. SSL_pending().
  23. Up to OpenSSL 0.9.6, SSL_pending() does not check if the record type
  24. of pending data is application data.
  25. =head1 SEE ALSO
  26. L<SSL_read(3)|SSL_read(3)>,
  27. L<SSL_CTX_set_read_ahead(3)|SSL_CTX_set_read_ahead(3)>, L<ssl(3)|ssl(3)>
  28. =cut