light cca refator and expose some cca values to the outside

This commit is contained in:
2024-07-12 13:14:24 +02:00
parent 1d97dbe73d
commit 6e681aa3fd
9 changed files with 110 additions and 36 deletions

View File

@@ -54,7 +54,7 @@ struct CCAI {
virtual float getCurrentDelay(void) const = 0;
// return the current believed window in bytes of how much data can be inflight,
virtual float getWindow(void) = 0;
virtual float getWindow(void) const = 0;
// TODO: api for how much data we should send
// take time since last sent into account
@@ -64,8 +64,12 @@ struct CCAI {
// get the list of timed out seq_ids
virtual std::vector<SeqIDType> getTimeouts(void) const = 0;
// returns -1 if not implemented, can return 0
virtual int64_t inFlightCount(void) const { return -1; }
// returns -1 if not implemented, can return 0
virtual int64_t inFlightBytes(void) const { return -1; }
public: // callbacks
// data size is without overhead
virtual void onSent(SeqIDType seq, size_t data_size) = 0;