/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* this indicates that only the write side of socket should be shutdown
*/
WRITE_SHUTDOWN = 0x04,
+ /*
+ * use msg zerocopy if allowed
+ */
+ WRITE_MSG_ZEROCOPY = 0x08,
};
/*
return nullptr;
}
+ /**
+ * Return the application protocol being used by the underlying transport
+ * protocol. This is useful for transports which are used to tunnel other
+ * protocols.
+ */
+ virtual std::string getApplicationProtocol() noexcept {
+ return "";
+ }
+
+ /**
+ * Returns the name of the security protocol being used.
+ */
+ virtual std::string getSecurityProtocol() const {
+ return "";
+ }
+
/**
* @return True iff end of record tracking is enabled
*/
return const_cast<T*>(static_cast<const AsyncTransportWrapper*>(this)
->getUnderlyingTransport<T>());
}
-
- /**
- * Return the application protocol being used by the underlying transport
- * protocol. This is useful for transports which are used to tunnel other
- * protocols.
- */
- virtual std::string getApplicationProtocol() noexcept {
- return "";
- }
-
- /**
- * Returns the name of the security protocol being used.
- */
- virtual std::string getSecurityProtocol() const { return ""; }
};
-} // folly
+} // namespace folly