|
Electroneum
|
#include <network_throttle-detail.hpp>


Public Member Functions | |
| network_throttle (const std::string &nameshort, const std::string &name, int window_size=-1) | |
| virtual | ~network_throttle () |
| virtual void | set_name (const std::string &name) |
| virtual void | set_target_speed (network_speed_kbps target) |
| virtual network_speed_kbps | get_target_speed () |
| virtual void | handle_trafic_exact (size_t packet_size) |
| count the new traffic/packet; the size is exact considering all network costs More... | |
| virtual void | handle_trafic_tcp (size_t packet_size) |
| count the new traffic/packet; the size is as TCP, we will consider MTU etc More... | |
| virtual void | tick () |
| poke and update timers/history (recalculates, moves the history if needed, checks the real clock etc) More... | |
| virtual double | get_time_seconds () const |
| timer that we use, time in seconds, monotionic More... | |
| 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) More... | |
| virtual network_time_seconds | get_sleep_time_after_tick (size_t packet_size) |
| increase the timer if needed, and get the package size More... | |
| 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 More... | |
| virtual size_t | get_recommended_size_of_planned_transport () const |
| what should be the size (bytes) of next data block to be transported More... | |
| virtual size_t | get_recommended_size_of_planned_transport_window (double force_window) const |
| ditto, but for given windows time frame More... | |
| virtual double | get_current_speed () const |
| virtual void | get_stats (uint64_t &total_packets, uint64_t &total_bytes) const |
Definition at line 49 of file network_throttle-detail.hpp.
| epee::net_utils::network_throttle::network_throttle | ( | const std::string & | nameshort, |
| const std::string & | name, | ||
| int | window_size = -1 |
||
| ) |
Definition at line 126 of file network_throttle-detail.cpp.

|
virtual |
Definition at line 119 of file network_throttle-detail.cpp.
|
virtual |
MAIN LOGIC (see base class for info)
Implements epee::net_utils::i_network_throttle.
Definition at line 249 of file network_throttle-detail.cpp.


|
virtual |
Definition at line 345 of file network_throttle-detail.cpp.
|
virtual |
what should be the size (bytes) of next data block to be transported
Implements epee::net_utils::i_network_throttle.
Definition at line 334 of file network_throttle-detail.cpp.

|
virtual |
ditto, but for given windows time frame
Definition at line 324 of file network_throttle-detail.cpp.


|
virtual |
gets the Delay (recommended Delay time) from calc. (not safe: only if time didnt change?) TODO
Implements epee::net_utils::i_network_throttle.
Definition at line 240 of file network_throttle-detail.cpp.


|
virtual |
increase the timer if needed, and get the package size
Implements epee::net_utils::i_network_throttle.
Definition at line 219 of file network_throttle-detail.cpp.

|
virtual |
Implements epee::net_utils::i_network_throttle.
Definition at line 360 of file network_throttle-detail.cpp.
|
virtual |
Implements epee::net_utils::i_network_throttle.
Definition at line 155 of file network_throttle-detail.cpp.
|
virtual |
timer that we use, time in seconds, monotionic
Implements epee::net_utils::i_network_throttle.
Definition at line 312 of file network_throttle-detail.cpp.


|
virtual |
count the new traffic/packet; the size is exact considering all network costs
Implements epee::net_utils::i_network_throttle.
Definition at line 186 of file network_throttle-detail.cpp.
|
virtual |
count the new traffic/packet; the size is as TCP, we will consider MTU etc
Implements epee::net_utils::i_network_throttle.
Definition at line 212 of file network_throttle-detail.cpp.
|
virtual |
Implements epee::net_utils::i_network_throttle.
Definition at line 144 of file network_throttle-detail.cpp.

|
virtual |
Implements epee::net_utils::i_network_throttle.
Definition at line 149 of file network_throttle-detail.cpp.
|
virtual |
poke and update timers/history (recalculates, moves the history if needed, checks the real clock etc)
Implements epee::net_utils::i_network_throttle.
Definition at line 160 of file network_throttle-detail.cpp.

