Skip to content

Commit

Permalink
Add a missing AsyncSSLSocket::newSocket overload
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Aleksei Averchenko authored and facebook-github-bot committed Aug 17, 2023
1 parent ab45d9b commit b8f65b1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions folly/io/async/AsyncSSLSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,17 @@ class AsyncSSLSocket : public AsyncSocket {
bool server = true,
bool deferSecurityNegotiation = false);

/**
* Helper function to create a server/client shared_ptr<AsyncSSLSocket>.
*/
static UniquePtr newSocket(
std::shared_ptr<folly::SSLContext> 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<AsyncSSLSocket>.
*/
Expand Down

0 comments on commit b8f65b1

Please sign in to comment.