From b8f65b19372207c60889836787b7734f0124bfa9 Mon Sep 17 00:00:00 2001 From: Aleksei Averchenko Date: Thu, 17 Aug 2023 10:11:43 -0700 Subject: [PATCH] Add a missing AsyncSSLSocket::newSocket overload Summary: There's an `AsyncSSLSocket` constructor that doesn't have the corresponding `newSocket` overload. This diff adds it. Reviewed By: dmm-fb Differential Revision: D48355224 fbshipit-source-id: 6f5586f418d18ac16240dd6acacfe8f323723fa6 --- folly/io/async/AsyncSSLSocket.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/folly/io/async/AsyncSSLSocket.h b/folly/io/async/AsyncSSLSocket.h index 8b5a797c224..3a5d9d646a3 100644 --- a/folly/io/async/AsyncSSLSocket.h +++ b/folly/io/async/AsyncSSLSocket.h @@ -284,6 +284,17 @@ class AsyncSSLSocket : public AsyncSocket { bool server = true, bool deferSecurityNegotiation = false); + /** + * Helper function to create a server/client shared_ptr. + */ + static UniquePtr newSocket( + std::shared_ptr ctx, + EventBase* evb, + Options&& options) { + return AsyncSSLSocket::UniquePtr( + new AsyncSSLSocket(std::move(ctx), evb, std::move(options))); + } + /** * Helper function to create a server/client shared_ptr. */