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

@@ -7,8 +7,8 @@
#pragma once
#include <folly/io/async/EventBase.h>
#include <memory>
#include "FlipperScheduler.h"
namespace facebook {
namespace flipper {
@@ -32,37 +32,35 @@ class FlipperSocketProvider {
@param endpoint Endpoint to connect to.
@param payload Any configuration payload to establish a connection with
the specified endpoint.
@param scheduler An scheduler used to schedule and execute connection
operations.
@param eventBase A folly event base used to execute connection operations.
*/
virtual std::unique_ptr<FlipperSocket> create(
FlipperConnectionEndpoint endpoint,
std::unique_ptr<FlipperSocketBasePayload> payload,
Scheduler* scheduler) = 0;
folly::EventBase* eventBase) = 0;
/**
Create an instance of FlipperSocket.
@param endpoint Endpoint to connect to.
@param payload Any configuration payload to establish a connection with
the specified endpoint.
@param scheduler An scheduler used to schedule and execute connection
operations.
@param eventBase A folly event base used to execute connection operations.
@param connectionContextStore A connection context store used for obtaining
the certificate used for secure connections.
*/
virtual std::unique_ptr<FlipperSocket> create(
FlipperConnectionEndpoint endpoint,
std::unique_ptr<FlipperSocketBasePayload> payload,
Scheduler* scheduler,
folly::EventBase* eventBase,
ConnectionContextStore* connectionContextStore) = 0;
static std::unique_ptr<FlipperSocket> socketCreate(
FlipperConnectionEndpoint endpoint,
std::unique_ptr<FlipperSocketBasePayload> payload,
Scheduler* scheduler);
folly::EventBase* eventBase);
static std::unique_ptr<FlipperSocket> socketCreate(
FlipperConnectionEndpoint endpoint,
std::unique_ptr<FlipperSocketBasePayload> payload,
Scheduler* scheduler,
folly::EventBase* eventBase,
ConnectionContextStore* connectionContextStore);
static void setDefaultProvider(