mirror of
https://github.com/monero-project/monero.git
synced 2025-08-07 13:22:18 -04:00
Cleanup TCP throttling code (performance) + move connection checks
This commit is contained in:
parent
893916ad09
commit
7e766e13c3
7 changed files with 93 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue