Revert D36052198: Partially remove dependency on folly async

Differential Revision:
D36052198 (ade685c621)

Original commit changeset: 170d64a324a1

Original Phabricator Diff: D36052198 (ade685c621)

fbshipit-source-id: 69d2b18e70a6267667432d6ed9dc1c5bc545b417
This commit is contained in:
Billy Ng
2022-05-12 18:47:41 -07:00
committed by Facebook GitHub Bot
parent ade685c621
commit 3804ccf898
18 changed files with 116 additions and 132 deletions

View File

@@ -14,6 +14,8 @@
#include <Flipper/Log.h>
#include <folly/String.h>
#include <folly/futures/Future.h>
#include <folly/io/async/AsyncSocketException.h>
#include <folly/io/async/SSLContext.h>
#include <folly/json.h>
#include <cctype>
#include <iomanip>
@@ -30,24 +32,24 @@ namespace flipper {
FlipperWebSocket::FlipperWebSocket(
FlipperConnectionEndpoint endpoint,
std::unique_ptr<FlipperSocketBasePayload> payload,
Scheduler* scheduler)
folly::EventBase* eventBase)
: FlipperWebSocket(
std::move(endpoint),
std::move(payload),
scheduler,
eventBase,
nullptr) {}
FlipperWebSocket::FlipperWebSocket(
FlipperConnectionEndpoint endpoint,
std::unique_ptr<FlipperSocketBasePayload> payload,
Scheduler* scheduler,
folly::EventBase* eventBase,
ConnectionContextStore* connectionContextStore) {
if (endpoint.secure) {
socket_ = std::make_unique<WebSocketTLSClient>(
endpoint, std::move(payload), scheduler, connectionContextStore);
endpoint, std::move(payload), eventBase, connectionContextStore);
} else {
socket_ = std::make_unique<WebSocketClient>(
endpoint, std::move(payload), scheduler, connectionContextStore);
endpoint, std::move(payload), eventBase, connectionContextStore);
}
}