21 #ifndef UTP_REMOTEWINDOW_H
22 #define UTP_REMOTEWINDOW_H
25 #include <QSharedPointer>
27 #include <ktorrent_export.h>
28 #include <util/constants.h>
29 #include <utp/timevalue.h>
30 #include <utp/packetbuffer.h>
44 bt::TimeStamp send_time;
57 virtual void updateRTT(
const Header* hdr, bt::Uint32 packet_rtt, bt::Uint32 packet_size) = 0;
84 return cur_window + packet_size <= qMin(wnd_size, max_window);
90 bt::Uint32 m = qMin(wnd_size, max_window);
94 return m - cur_window;
112 bt::Uint32 currentWindow()
const {
return cur_window;}
113 bt::Uint32 maxWindow()
const {
return max_window;}
114 bt::Uint32 windowSize()
const {
return wnd_size;}
124 bt::Uint32 cur_window;
125 bt::Uint32 max_window;
127 QList<UnackedPacket> unacked_packets;
128 bt::Uint16 last_ack_nr;
129 bt::Uint32 last_ack_receive_count;
134 #endif // UTP_REMOTEWINDOW_H