#include <network_throttle-detail.hpp>
|
| | 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 |
| |
◆ network_throttle()
| epee::net_utils::network_throttle::network_throttle |
( |
const std::string & |
nameshort, |
|
|
const std::string & |
name, |
|
|
int |
window_size = -1 |
|
) |
| |
◆ ~network_throttle()
| epee::net_utils::network_throttle::~network_throttle |
( |
| ) |
|
|
virtual |
◆ _handle_trafic_exact()
| void epee::net_utils::network_throttle::_handle_trafic_exact |
( |
size_t |
packet_size, |
|
|
size_t |
orginal_size |
|
) |
| |
|
privatevirtual |
◆ calculate_times()
| void epee::net_utils::network_throttle::calculate_times |
( |
size_t |
packet_size, |
|
|
calculate_times_struct & |
cts, |
|
|
bool |
dbg, |
|
|
double |
force_window |
|
) |
| const |
|
virtual |
◆ get_current_speed()
| double epee::net_utils::network_throttle::get_current_speed |
( |
| ) |
const |
|
virtual |
◆ get_recommended_size_of_planned_transport()
| size_t epee::net_utils::network_throttle::get_recommended_size_of_planned_transport |
( |
| ) |
const |
|
virtual |
◆ get_recommended_size_of_planned_transport_window()
| size_t epee::net_utils::network_throttle::get_recommended_size_of_planned_transport_window |
( |
double |
force_window | ) |
const |
|
virtual |
ditto, but for given windows time frame
◆ get_sleep_time()
◆ get_sleep_time_after_tick()
| network_time_seconds epee::net_utils::network_throttle::get_sleep_time_after_tick |
( |
size_t |
packet_size | ) |
|
|
virtual |
◆ get_stats()
| void epee::net_utils::network_throttle::get_stats |
( |
uint64_t & |
total_packets, |
|
|
uint64_t & |
total_bytes |
|
) |
| const |
|
virtual |
◆ get_target_speed()
◆ get_time_seconds()
| double epee::net_utils::network_throttle::get_time_seconds |
( |
| ) |
const |
|
virtual |
◆ handle_trafic_exact()
| void epee::net_utils::network_throttle::handle_trafic_exact |
( |
size_t |
packet_size | ) |
|
|
virtual |
◆ handle_trafic_tcp()
| void epee::net_utils::network_throttle::handle_trafic_tcp |
( |
size_t |
packet_size | ) |
|
|
virtual |
◆ logger_handle_net()
| void epee::net_utils::network_throttle::logger_handle_net |
( |
const std::string & |
filename, |
|
|
double |
time, |
|
|
size_t |
size |
|
) |
| |
|
privatevirtual |
◆ set_name()
| void epee::net_utils::network_throttle::set_name |
( |
const std::string & |
name | ) |
|
|
virtual |
◆ set_target_speed()
◆ tick()
| void epee::net_utils::network_throttle::tick |
( |
| ) |
|
|
virtual |
◆ time_to_slot()
◆ m_any_packet_yet
| bool epee::net_utils::network_throttle::m_any_packet_yet |
|
private |
◆ m_history
| boost::circular_buffer< packet_info > epee::net_utils::network_throttle::m_history |
|
private |
◆ m_last_sample_time
◆ m_name
| std::string epee::net_utils::network_throttle::m_name |
|
private |
◆ m_nameshort
| std::string epee::net_utils::network_throttle::m_nameshort |
|
private |
◆ m_network_add_cost
| size_t epee::net_utils::network_throttle::m_network_add_cost |
|
private |
◆ m_network_max_segment
| size_t epee::net_utils::network_throttle::m_network_max_segment |
|
private |
◆ m_network_minimal_segment
| size_t epee::net_utils::network_throttle::m_network_minimal_segment |
|
private |
◆ m_slot_size
◆ m_start_time
◆ m_target_speed
◆ m_total_bytes
| uint64_t epee::net_utils::network_throttle::m_total_bytes |
|
private |
◆ m_total_packets
| uint64_t epee::net_utils::network_throttle::m_total_packets |
|
private |
◆ m_window_size
| const size_t epee::net_utils::network_throttle::m_window_size |
|
private |
The documentation for this class was generated from the following files: