small flow stuff and hs fix

This commit is contained in:
Green Sky
2025-09-02 10:53:49 +02:00
parent 0ad4c4997c
commit be9bb4e233
4 changed files with 10 additions and 5 deletions

View File

@@ -29,9 +29,8 @@ struct CUBIC : public FlowOnly {
float getWindow(void) const override;
// TODO: api for how much data we should send
// take time since last sent into account
// respect max_byterate_allowed
// takes time since last sent into account
// respects max_byterate_allowed
int64_t canSend(float time_delta) override;
};

View File

@@ -33,7 +33,7 @@ void FlowOnly::updateWindow(void) {
void FlowOnly::updateCongestion(void) {
updateWindow();
const auto tmp_window = getWindow();
const auto tmp_window = FlowOnly::getWindow();
// packet window * 0.3
// but atleast 4
int32_t max_consecutive_events = std::clamp<int32_t>(

View File

@@ -52,7 +52,7 @@ struct FlowOnly : public CCAI {
float getCurrentDelay(void) const override;
// call updateWindow() to update this value
float getWindow(void) const override;
virtual float getWindow(void) const override;
void addRTT(float new_delay);

View File

@@ -246,6 +246,12 @@ void NGCHS2Rizzler::handleMsgPack(ContactHandle4 sync_by_c, const std::vector<ui
cr.emplace_or_replace<Contact::Components::Parent>(from_c, parent);
_cs.throwEventConstruct(from_c);
} else if (!cr.all_of<Contact::Components::Parent>(from_c)) {
std::cerr << "NGCHS2Rizzler warning: from contact missing parent, assuming and force constructing! find and fix the cause!\n";
// TODO: only if public message
// we require this for file messages
cr.emplace_or_replace<Contact::Components::Parent>(from_c, parent);
_cs.throwEventUpdate(from_c);
}
}