aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/src/ssl/mod.rs')
-rw-r--r--openssl/src/ssl/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index ab559b46..13d9572b 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -707,6 +707,13 @@ impl Ssl {
}
}
}
+
+ /// pending() takes into account only bytes from the TLS/SSL record that is currently being processed (if any).
+ pub fn pending(&self) -> usize {
+ unsafe {
+ ffi::SSL_pending(self.ssl) as usize
+ }
+ }
}
macro_rules! make_LibSslError {
@@ -882,6 +889,11 @@ impl<S: Read+Write> SslStream<S> {
pub fn get_selected_npn_protocol(&self) -> Option<&[u8]> {
self.ssl.get_selected_npn_protocol()
}
+
+ /// pending() takes into account only bytes from the TLS/SSL record that is currently being processed (if any).
+ pub fn pending(&self) -> usize {
+ self.ssl.pending()
+ }
}
impl<S: Read+Write> Read for SslStream<S> {