38 #ifndef INCLUDED_network_throttle_hpp
39 #define INCLUDED_network_throttle_hpp
41 #include <boost/asio.hpp>
44 #include <boost/noncopyable.hpp>
45 #include <boost/shared_ptr.hpp>
48 #include <boost/asio.hpp>
49 #include <boost/array.hpp>
50 #include <boost/noncopyable.hpp>
51 #include <boost/shared_ptr.hpp>
52 #include <boost/enable_shared_from_this.hpp>
53 #include <boost/interprocess/detail/atomic.hpp>
54 #include <boost/thread/thread.hpp>
60 #include <boost/lambda/bind.hpp>
61 #include <boost/lambda/lambda.hpp>
62 #include <boost/uuid/random_generator.hpp>
63 #include <boost/chrono.hpp>
64 #include <boost/utility/value_init.hpp>
65 #include <boost/asio/deadline_timer.hpp>
66 #include <boost/date_time/posix_time/posix_time.hpp>
67 #include <boost/thread/thread.hpp>
virtual void get_stats(uint64_t &total_packets, uint64_t &total_bytes) const =0
virtual network_time_seconds get_sleep_time_after_tick(size_t packet_size)=0
virtual void logger_handle_net(const std::string &filename, double time, size_t size)=0
virtual network_speed_kbps get_target_speed()=0
virtual double get_time_seconds() const =0
virtual void calculate_times(size_t packet_size, calculate_times_struct &cts, bool dbg, double force_window) const =0
virtual void handle_trafic_tcp(size_t packet_size)=0
virtual void set_target_speed(network_speed_kbps target)=0
virtual size_t get_recommended_size_of_planned_transport() const =0
virtual network_time_seconds get_sleep_time(size_t packet_size) const =0
virtual void handle_trafic_exact(size_t packet_size)=0
virtual void set_name(const std::string &name)=0
static boost::mutex m_lock_get_global_throttle_inreq
static i_network_throttle & get_global_throttle_inreq()
ditto ; use lock ... use m_lock_get_global_throttle_inreq obviously
static boost::mutex m_lock_get_global_throttle_in
static i_network_throttle & get_global_throttle_in()
singleton ; for friend class ; caller MUST use proper locks! like m_lock_get_global_throttle_in
static i_network_throttle & get_global_throttle_out()
ditto ; use lock ... use m_lock_get_global_throttle_out obviously
static boost::mutex m_lock_get_global_throttle_out
double network_speed_kbps
double network_time_seconds
calculate_times_struct calculate_times_struct
unsigned __int64 uint64_t
double recomendetDataSize