Add SO_ZEROCOPY support
[folly.git] / folly / io / async / AsyncTransport.h
index 7af32f2665fa44d702cbce849e3b1018770ca2a2..c42888da211144eff5bbb1042a3b40e5cbc93074 100644 (file)
@@ -22,9 +22,9 @@
 #include <folly/io/async/AsyncSocketBase.h>
 #include <folly/io/async/DelayedDestruction.h>
 #include <folly/io/async/EventBase.h>
-#include <folly/ssl/OpenSSLPtrTypes.h>
 #include <folly/portability/OpenSSL.h>
 #include <folly/portability/SysUio.h>
+#include <folly/ssl/OpenSSLPtrTypes.h>
 
 constexpr bool kOpenSslModeMoveBufferOwnership =
 #ifdef SSL_MODE_MOVE_BUFFER_OWNERSHIP
@@ -60,6 +60,10 @@ enum class WriteFlags : uint32_t {
    * this indicates that only the write side of socket should be shutdown
    */
   WRITE_SHUTDOWN = 0x04,
+  /*
+   * use msg zerocopy if allowed
+   */
+  WRITE_MSG_ZEROCOPY = 0x08,
 };
 
 /*
@@ -694,4 +698,4 @@ class AsyncTransportWrapper : virtual public AsyncTransport,
   virtual std::string getSecurityProtocol() const { return ""; }
 };
 
-} // folly
+} // namespace folly