22 #ifndef UTP_DELAYWINDOW_H
23 #define UTP_DELAYWINDOW_H
26 #include <boost/circular_buffer.hpp>
28 #include <utp/utpprotocol.h>
32 const bt::Uint32 MAX_DELAY = 0xFFFFFFFF;
34 class KTORRENT_EXPORT DelayWindow
38 virtual ~DelayWindow();
41 bt::Uint32 update(
const Header* hdr, bt::TimeStamp receive_time);
46 bt::Uint32 timestamp_difference_microseconds;
47 bt::TimeStamp receive_time;
49 DelayEntry() : timestamp_difference_microseconds(0), receive_time(0)
52 DelayEntry(bt::Uint32 tdm, bt::TimeStamp rt) : timestamp_difference_microseconds(tdm), receive_time(rt)
55 bool operator < (
const DelayEntry & e)
const
57 return timestamp_difference_microseconds < e.timestamp_difference_microseconds;
61 typedef boost::circular_buffer<DelayEntry>::iterator DelayEntryItr;
64 boost::circular_buffer<DelayEntry> delay_window;
69 #endif // UTP_DELAYWINDOW_H