37 #ifndef INCLUDED_src_p2p_throttle_detail_hpp 38 #define INCLUDED_src_p2p_throttle_detail_hpp size_t m_size
Definition: network_throttle-detail.hpp:51
virtual size_t get_recommended_size_of_planned_transport_window(double force_window) const
ditto, but for given windows time frame
Definition: network_throttle-detail.cpp:338
network_speed_kbps m_real_target_speed
Definition: network_throttle-detail.hpp:57
size_t m_network_add_cost
Definition: network_throttle-detail.hpp:58
virtual ~network_throttle()
Definition: network_throttle-detail.cpp:135
network_time_seconds m_slot_size
Definition: network_throttle-detail.hpp:63
packet_info()
Definition: network_throttle-detail.cpp:137
network_throttle(const std::string &nameshort, const std::string &name, int window_size=-1)
Definition: network_throttle-detail.cpp:142
network_time_seconds m_last_sample_time
Definition: network_throttle-detail.hpp:67
virtual void _handle_trafic_exact(size_t packet_size, size_t orginal_size)
Definition: network_throttle-detail.cpp:209
virtual network_speed_kbps get_target_speed()
Definition: network_throttle-detail.cpp:172
virtual void logger_handle_net(const std::string &filename, double time, size_t size)
Definition: network_throttle-detail.cpp:240
double network_time_seconds
Definition: network_throttle.hpp:85
virtual double get_current_speed() const
Definition: network_throttle-detail.cpp:359
virtual void set_real_target_speed(network_speed_kbps real_target)
Definition: network_throttle-detail.cpp:167
virtual void calculate_times(size_t packet_size, calculate_times_struct &cts, bool dbg, double force_window) const
MAIN LOGIC (see base class for info)
Definition: network_throttle-detail.cpp:263
network_time_seconds m_start_time
Definition: network_throttle-detail.hpp:68
time_t time
Definition: blockchain.cpp:89
Definition: network_throttle-detail.hpp:50
virtual size_t get_recommended_size_of_planned_transport() const
what should be the size (bytes) of next data block to be transported
Definition: network_throttle-detail.cpp:348
network_throttle m_inreq
for requesting incomming traffic (this is exact usually)
Definition: network_throttle-detail.hpp:113
virtual network_time_seconds time_to_slot(network_time_seconds t) const
Definition: network_throttle-detail.hpp:102
virtual void set_target_speed(network_speed_kbps target)
Definition: network_throttle-detail.cpp:160
double network_speed_kbps
Definition: network_throttle.hpp:84
network_throttle_bw(const std::string &name1)
Definition: network_throttle.cpp:101
const size_t m_window_size
Definition: network_throttle-detail.hpp:62
interface for throttling of connection (count and rate-limit speed etc)
virtual void handle_trafic_tcp(size_t packet_size)
count the new traffic/packet; the size is as TCP, we will consider MTU etc
Definition: network_throttle-detail.cpp:228
virtual void handle_trafic_exact(size_t packet_size)
count the new traffic/packet; the size is exact considering all network costs
Definition: network_throttle-detail.cpp:204
network_throttle m_out
for outgoing traffic that we just sent (this is exact usually)
Definition: network_throttle-detail.hpp:114
virtual void tick()
poke and update timers/history (recalculates, moves the history if needed, checks the real clock etc)...
Definition: network_throttle-detail.cpp:177
bool m_any_packet_yet
Definition: network_throttle-detail.hpp:69
virtual network_time_seconds get_sleep_time_after_tick(size_t packet_size)
increase the timer if needed, and get the package size
Definition: network_throttle-detail.cpp:235
Definition: network_throttle.hpp:137
std::vector< packet_info > m_history
Definition: network_throttle-detail.hpp:66
Definition: network_throttle-detail.hpp:110
Definition: connection_basic.cpp:91
virtual network_time_seconds get_sleep_time(size_t packet_size) const
gets the Delay (recommended Delay time) from calc. (not safe: only if time didnt change?) TODO
Definition: network_throttle-detail.cpp:254
std::string m_nameshort
Definition: network_throttle-detail.hpp:72
Definition: network_throttle.hpp:93
Definition: network_throttle-detail.hpp:48
std::string m_name
Definition: network_throttle-detail.hpp:71
size_t m_network_minimal_segment
Definition: network_throttle-detail.hpp:59
const char * name
Definition: simplewallet.cpp:180
network_speed_kbps m_target_speed
Definition: network_throttle-detail.hpp:56
size_t m_network_max_segment
Definition: network_throttle-detail.hpp:60
virtual double get_time_seconds() const
timer that we use, time in seconds, monotionic
Definition: network_throttle-detail.cpp:326
network_throttle m_in
for incomming traffic (this we can not controll directly as it depends of what others send to us - us...
Definition: network_throttle-detail.hpp:112
virtual void set_name(const std::string &name)
Definition: network_throttle-detail.cpp:155