mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-04-18 17:24:03 +03:00
Summary: This diff implements running ccp as a thread within mvfst. 1. It adds `libstartccp`, which is a tiny rust library that provides an interface between multiple ccp algorithms (written in rust) and the calling code in mvfst (written in c++). It exposes a single function `ccp_run_forever`, which takes an algorithm and optional parameters, and then starts ccp using the correct algorithm. This function never returns, so it is intended to be called from a dedicated thread. 2. When ccp is enabled and a `ccpConfig` is provided, `QuicServer` simply calls `ccp_run_forever` its own thread, passing the `ccpConfig`, which specifies both the algorithm name and any optional parameters. To add a new ccp algorithm: 1. Place the algorithm source code in its own folder here: `quic/congestion_control/third_party/ccp/[ALGORITHM]` 2. Add the algorithm to `quic/congestion_control/third_party/ccp/src.rs`: (a) Add `extern crate [ALGORITHM];` at the top. (b) Add `register_alg!([ALGORITHM]);` at the end of the `_start` function. Reviewed By: udippant Differential Revision: D21854346 fbshipit-source-id: 5b0718a90d560e9cbe6e616daea5e910e00e6aeb
2 lines
11 B
Plaintext
2 lines
11 B
Plaintext
Cargo.lock
|