Cleanup TCP throttling code (performance) + move connection checks

This commit is contained in:
Lee *!* Clagett 2024-08-27 14:07:52 -04:00
parent 893916ad09
commit 7e766e13c3
7 changed files with 93 additions and 34 deletions

View file

@ -46,13 +46,13 @@ namespace net_utils
class network_throttle : public i_network_throttle {
private:
public:
struct packet_info {
size_t m_size; // octets sent. Summary for given small-window (e.g. for all packaged in 1 second)
packet_info();
};
private:
network_speed_bps m_target_speed;
size_t m_network_add_cost; // estimated add cost of headers
size_t m_network_minimal_segment; // estimated minimal cost of sending 1 byte to round up to