small flow stuff and hs fix
This commit is contained in:
@@ -29,9 +29,8 @@ struct CUBIC : public FlowOnly {
|
|||||||
|
|
||||||
float getWindow(void) const override;
|
float getWindow(void) const override;
|
||||||
|
|
||||||
// TODO: api for how much data we should send
|
// takes time since last sent into account
|
||||||
// take time since last sent into account
|
// respects max_byterate_allowed
|
||||||
// respect max_byterate_allowed
|
|
||||||
int64_t canSend(float time_delta) override;
|
int64_t canSend(float time_delta) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ void FlowOnly::updateWindow(void) {
|
|||||||
|
|
||||||
void FlowOnly::updateCongestion(void) {
|
void FlowOnly::updateCongestion(void) {
|
||||||
updateWindow();
|
updateWindow();
|
||||||
const auto tmp_window = getWindow();
|
const auto tmp_window = FlowOnly::getWindow();
|
||||||
// packet window * 0.3
|
// packet window * 0.3
|
||||||
// but atleast 4
|
// but atleast 4
|
||||||
int32_t max_consecutive_events = std::clamp<int32_t>(
|
int32_t max_consecutive_events = std::clamp<int32_t>(
|
||||||
|
@@ -52,7 +52,7 @@ struct FlowOnly : public CCAI {
|
|||||||
float getCurrentDelay(void) const override;
|
float getCurrentDelay(void) const override;
|
||||||
|
|
||||||
// call updateWindow() to update this value
|
// call updateWindow() to update this value
|
||||||
float getWindow(void) const override;
|
virtual float getWindow(void) const override;
|
||||||
|
|
||||||
void addRTT(float new_delay);
|
void addRTT(float new_delay);
|
||||||
|
|
||||||
|
@@ -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);
|
cr.emplace_or_replace<Contact::Components::Parent>(from_c, parent);
|
||||||
|
|
||||||
_cs.throwEventConstruct(from_c);
|
_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user