aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-02-12 12:03:58 +0000
committerMatt Caswell <matt@openssl.org>2016-03-07 21:39:27 +0000
commit49580f25b3e6239a277c9fc2708c0354f419ec17 (patch)
tree999a9deacba23fb70b41ab170aca8f2a21650e4e /include
parentdad78fb13d790cd06afd6e88067c038d22d7780f (diff)
downloadopenssl-49580f25b3e6239a277c9fc2708c0354f419ec17.zip
openssl-49580f25b3e6239a277c9fc2708c0354f419ec17.tar.gz
openssl-49580f25b3e6239a277c9fc2708c0354f419ec17.tar.bz2
Add an SSL_has_pending() function
This is similar to SSL_pending() but just returns a 1 if there is data pending in the internal OpenSSL buffers or 0 otherwise (as opposed to SSL_pending() which returns the number of bytes available). Unlike SSL_pending() this will work even if "read_ahead" is set (which is the case if you are using read pipelining, or if you are doing DTLS). A 1 return value means that we have unprocessed data. It does *not* necessarily indicate that there will be application data returned from a call to SSL_read(). The unprocessed data may not be application data or there could be errors when we attempt to parse the records. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'include')
-rw-r--r--include/openssl/ssl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 94ea5ee..aa3daca 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1408,6 +1408,7 @@ __owur const char *SSL_get_cipher_list(const SSL *s, int n);
__owur char *SSL_get_shared_ciphers(const SSL *s, char *buf, int len);
__owur int SSL_get_read_ahead(const SSL *s);
__owur int SSL_pending(const SSL *s);
+__owur int SSL_has_pending(const SSL *s);
# ifndef OPENSSL_NO_SOCK
__owur int SSL_set_fd(SSL *s, int fd);
__owur int SSL_set_rfd(SSL *s, int fd);