Github user bgedik commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1476#discussion_r163420333
--- Diff: lib/cpp/src/thrift/transport/TSSLSocket.h ---
@@ -78,6 +78,7 @@ class TSSLSocket : public TSocket {
bool peek();
void open();
void close();
+ bool hasPendingDataToRead();
--- End diff --
Peek is designed to be blocking for blocking sockets, non-blocking for
non-blocking sockets. This one is non-blocking for both. I can replace the
existing peek() with this implementation if you prefer that.
---