Skip to content

Commit

Permalink
setTransportSettings()
Browse files Browse the repository at this point in the history
Summary: - add api for setting custom transport settings

Reviewed By: jbeshay, mjoras

Differential Revision: D45366185

fbshipit-source-id: 661f3a4ff97a0f8b79798645060e76f459fe015e
  • Loading branch information
hanidamlaj authored and facebook-github-bot committed May 5, 2023
1 parent b896b89 commit cfcc5cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
12 changes: 3 additions & 9 deletions quic/server/async_tran/QuicAsyncTransportServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@ void QuicAsyncTransportServer::setFizzContext(
fizzCtx_ = std::move(ctx);
}

void QuicAsyncTransportServer::setTransportSettings() {
quic::TransportSettings transportSettings;
uint64_t flowControl = 2024 * 1024 * 1024;
transportSettings.advertisedInitialConnectionWindowSize = flowControl;
transportSettings.advertisedInitialBidiLocalStreamWindowSize = flowControl;
transportSettings.advertisedInitialBidiRemoteStreamWindowSize = flowControl;
transportSettings.advertisedInitialUniStreamWindowSize = flowControl;
quicServer_->setTransportSettings(transportSettings);
void QuicAsyncTransportServer::setTransportSettings(
const quic::TransportSettings& ts) {
quicServer_->setTransportSettings(ts);
}

void QuicAsyncTransportServer::start(
Expand All @@ -52,7 +47,6 @@ void QuicAsyncTransportServer::start(
void QuicAsyncTransportServer::start(
const folly::SocketAddress& address,
std::vector<folly::EventBase*> evbs) {
setTransportSettings();
quicServer_->initialize(address, evbs, false /* useDefaultTransport */);
quicServer_->waitUntilInitialized();
createAcceptors(evbs);
Expand Down
3 changes: 2 additions & 1 deletion quic/server/async_tran/QuicAsyncTransportServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ class QuicAsyncTransportServer {

void shutdown();

void setTransportSettings(const quic::TransportSettings& ts);

protected:
void setTransportSettings();
void createAcceptors(std::vector<folly::EventBase*>& evbs);

QuicAsyncTransportAcceptor::AsyncTransportHook asyncTransportHook_;
Expand Down

0 comments on commit cfcc5cc

Please sign in to comment.