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


Classes | |
| struct | packet_info |
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 | |
| virtual void | handle_trafic_tcp (size_t packet_size) |
| count the new traffic/packet; the size is as TCP, we will consider MTU etc | |
| virtual void | tick () |
| poke and update timers/history (recalculates, moves the history if needed, checks the real clock etc) | |
| virtual double | get_time_seconds () const |
| timer that we use, time in seconds, monotionic | |
| 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). | |
| virtual network_time_seconds | get_sleep_time_after_tick (size_t packet_size) |
| increase the timer if needed, and get the package size | |
| 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 | |
| virtual size_t | get_recommended_size_of_planned_transport () const |
| what should be the size (bytes) of next data block to be transported | |
| virtual size_t | get_recommended_size_of_planned_transport_window (double force_window) const |
| ditto, but for given windows time frame | |
| virtual double | get_current_speed () const |
| virtual void | get_stats (uint64_t &total_packets, uint64_t &total_bytes) const |
Private Member Functions | |
| virtual network_time_seconds | time_to_slot (network_time_seconds t) const |
| virtual void | _handle_trafic_exact (size_t packet_size, size_t orginal_size) |
| virtual void | logger_handle_net (const std::string &filename, double time, size_t size) |
Private Attributes | |
| network_speed_bps | m_target_speed |
| size_t | m_network_add_cost |
| size_t | m_network_minimal_segment |
| size_t | m_network_max_segment |
| const size_t | m_window_size |
| network_time_seconds | m_slot_size |
| boost::circular_buffer< packet_info > | m_history |
| network_time_seconds | m_last_sample_time |
| network_time_seconds | m_start_time |
| bool | m_any_packet_yet |
| uint64_t | m_total_packets |
| uint64_t | m_total_bytes |
| std::string | m_name |
| std::string | m_nameshort |
| epee::net_utils::network_throttle::network_throttle | ( | const std::string & | nameshort, |
| const std::string & | name, | ||
| int | window_size = -1 ) |
|
virtual |
|
privatevirtual |
|
virtual |
MAIN LOGIC (see base class for info).
Implements epee::net_utils::i_network_throttle.
|
virtual |
|
virtual |
what should be the size (bytes) of next data block to be transported
Implements epee::net_utils::i_network_throttle.
|
virtual |
ditto, but for given windows time frame
|
virtual |
gets the Delay (recommended Delay time) from calc. (not safe: only if time didnt change?) TODO
Implements epee::net_utils::i_network_throttle.
|
virtual |
increase the timer if needed, and get the package size
Implements epee::net_utils::i_network_throttle.
|
virtual |
Implements epee::net_utils::i_network_throttle.
|
virtual |
Implements epee::net_utils::i_network_throttle.
|
virtual |
timer that we use, time in seconds, monotionic
Implements epee::net_utils::i_network_throttle.
|
virtual |
count the new traffic/packet; the size is exact considering all network costs
Implements epee::net_utils::i_network_throttle.
|
virtual |
count the new traffic/packet; the size is as TCP, we will consider MTU etc
Implements epee::net_utils::i_network_throttle.
|
privatevirtual |
Implements epee::net_utils::i_network_throttle.
|
virtual |
Implements epee::net_utils::i_network_throttle.
|
virtual |
Implements epee::net_utils::i_network_throttle.
|
virtual |
poke and update timers/history (recalculates, moves the history if needed, checks the real clock etc)
Implements epee::net_utils::i_network_throttle.
|
inlineprivatevirtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |