Commit bda140dc authored by Jason Rahman's avatar Jason Rahman Committed by Facebook GitHub Bot

Remove setZeroCopy() override

Summary:
When folly::AsyncSSLSocket is used in unencrypted mode, zero copy is
possible due to OpenSSL being bypassed, but the setZeroCopy() override in
AsyncSSLSocket prevents zero copy from being used. Remove the override (no
callers currently check the return value anyway).

Reviewed By: yfeldblum, yqz, jalatif

Differential Revision: D27044720

fbshipit-source-id: ec402ad2badb84150ecd1b7639770a49e16e9183
parent eef86a25
......@@ -832,9 +832,6 @@ class AsyncSSLSocket : public AsyncSocket {
asyncOperationFinishCallback_ = std::move(cb);
}
// zero copy is not supported by openssl.
bool setZeroCopy(bool /*enable*/) override { return false; }
private:
/**
* Handle the return from invoking SSL_accept
......
......@@ -206,20 +206,6 @@ TEST(AsyncSSLSocketTest, ConnectWriteReadClose) {
EXPECT_EQ(socket->getSSLSocket()->getTotalConnectTimeout().count(), 10000);
}
/**
* Check that zero copy options are a noop under AsyncSSLSocket since they
* aren't supported.
*/
TEST(AsyncSSLSocketTest, ZeroCopy) {
// Set up SSL context.
std::shared_ptr<SSLContext> sslContext(new SSLContext());
sslContext->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
auto socket = AsyncSSLSocket::newSocket(sslContext, /*evb=*/nullptr);
EXPECT_FALSE(socket->setZeroCopy(true));
EXPECT_FALSE(socket->getZeroCopy());
}
/**
* Same as above simple test, but with a large read len to test
* clamping behavior.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment