Allow httpsession to be movable readCB
[folly.git] / folly / io / async / AsyncSSLSocket.h
index 2e4d5bacbeee648cb9725bb8bb37e5cf2d1dc1c0..4900d2fa32b018d379f38e403d140daab6ffba9b 100644 (file)
@@ -676,6 +676,13 @@ class AsyncSSLSocket : public virtual AsyncSocket {
 
   void setReadCB(ReadCallback* callback) override;
 
+  /**
+   * Tries to enable the buffer movable experimental feature in openssl.
+   * This is not guaranteed to succeed in case openssl does not have
+   * the experimental feature built in.
+   */
+  void setBufferMovableEnabled(bool enabled);
+
   /**
    * Returns the peer certificate, or nullptr if no peer certificate received.
    */
@@ -828,6 +835,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
 
   bool parseClientHello_{false};
   bool cacheAddrOnFailure_{false};
+  bool bufferMovableEnabled_{false};
   std::unique_ptr<ssl::ClientHelloInfo> clientHelloInfo_;
 
   // Time taken to complete the ssl handshake.