diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-12-13 12:53:29 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-13 12:53:29 -0300 |
commit | 95a469ad28e54fe05c3ae548725e557f91021d79 (patch) | |
tree | 52b9ee5ebd82671f69e4bab9417ebaf751914048 /drivers/openssl/stream_peer_openssl.cpp | |
parent | 451b1d91446f6e15763b4d6ec3bd6d74c2be8080 (diff) |
added binary API to StreamPeer, fixes #2863
Diffstat (limited to 'drivers/openssl/stream_peer_openssl.cpp')
-rw-r--r-- | drivers/openssl/stream_peer_openssl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/openssl/stream_peer_openssl.cpp b/drivers/openssl/stream_peer_openssl.cpp index ef07f11334..81795fdc60 100644 --- a/drivers/openssl/stream_peer_openssl.cpp +++ b/drivers/openssl/stream_peer_openssl.cpp @@ -479,6 +479,13 @@ Error StreamPeerOpenSSL::get_partial_data(uint8_t* p_buffer, int p_bytes,int &r_ return OK; } +int StreamPeerOpenSSL::get_available_bytes() const { + + ERR_FAIL_COND_V(!connected,0); + + return SSL_pending(ssl); + +} StreamPeerOpenSSL::StreamPeerOpenSSL() { ctx=NULL; |