1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-09 10:00:57 +03:00

Add a useSplitConnectionCallbacks to mvfst

Summary:
This change just adds a (currently no-op) flag that will be used in diffs up the stack.

The idea here is that I'll add split QUIC connection callback interfaces that will live side by side with existing single monolithic callback for now. We will experiment with split callbacks on small scale to see that there is no regressions and then will phase out the old callback gradually.

This flag is to control which callback(s) to use.

Reviewed By: mjoras

Differential Revision: D30399667

fbshipit-source-id: 8fc4e4a005e93cf6d48a987f49edee33b90dbbf1
This commit is contained in:
Konstantin Tsoy
2021-08-31 18:23:38 -07:00
committed by Facebook GitHub Bot
parent 6659296aed
commit 21ea1990ab
6 changed files with 38 additions and 14 deletions

View File

@@ -29,7 +29,8 @@ namespace quic {
QuicTransportBase::QuicTransportBase(
folly::EventBase* evb,
std::unique_ptr<folly::AsyncUDPSocket> socket)
std::unique_ptr<folly::AsyncUDPSocket> socket,
bool useSplitConnectionCallbacks)
: evb_(evb),
socket_(std::move(socket)),
lossTimeout_(this),
@@ -52,7 +53,8 @@ QuicTransportBase::QuicTransportBase(
writeLooper_(new FunctionLooper(
evb,
[this](bool fromTimer) { pacedWriteDataToSocket(fromTimer); },
LooperType::WriteLooper)) {
LooperType::WriteLooper)),
useSplitConnectionCallbacks_(useSplitConnectionCallbacks) {
writeLooper_->setPacingFunction([this]() -> auto {
if (isConnectionPaced(*conn_)) {
return conn_->pacer->getTimeUntilNextWrite();