// just typedefs to in code define the units used. TODO later it will be enforced that casts to other numericals are only explicit to avoid mistakes? use boost::chrono?
// provides global (singleton) in/inreq/out throttle access
// [[note1]] see also http://www.nuonsoft.com/blog/2012/10/21/implementing-a-thread-safe-singleton-with-c11/
// [[note2]] _inreq is the requested in traffic - we anticipate we will get in-bound traffic soon as result of what we do (e.g. that we sent network downloads requests)
virtualvoidhandle_trafic_exact(size_tpacket_size)=0;// count the new traffic/packet; the size is exact considering all network costs
virtualvoidhandle_trafic_tcp(size_tpacket_size)=0;// count the new traffic/packet; the size is as TCP, we will consider MTU etc
virtualvoidtick()=0;// poke and update timers/history
// time calculations:
virtualvoidcalculate_times(size_tpacket_size,calculate_times_struct&cts,booldbg,doubleforce_window)const=0;// assuming sending new package (or 0), calculate:
// Average, Window, Delay, Recommended data size ; also gets dbg=debug flag, and forced widnow size if >0 or -1 for not forcing window size
// Average speed, Window size, recommended Delay to sleep now, Recommended size of data to send now
virtualnetwork_time_secondsget_sleep_time(size_tpacket_size)const=0;// gets the D (recommended Delay time) from calc
virtualnetwork_time_secondsget_sleep_time_after_tick(size_tpacket_size)=0;// ditto, but first tick the timer
virtualsize_tget_recommended_size_of_planned_transport()const=0;// what should be the recommended limit of data size that we can transport over current network_throttle in near future