diff options
author | sapier <Sapier at GMX dot net> | 2014-07-12 15:58:08 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-08-22 20:56:16 +0200 |
commit | 247a1ebf2317556eea79a018fb236a0145e55121 (patch) | |
tree | b8f79437fab71d899de96a4a06bb536262927c99 /src/connection.h | |
parent | 944ffe9e532a3b2be686ef28c33313148760b1c9 (diff) | |
download | minetest-247a1ebf2317556eea79a018fb236a0145e55121.tar.gz minetest-247a1ebf2317556eea79a018fb236a0145e55121.tar.bz2 minetest-247a1ebf2317556eea79a018fb236a0145e55121.zip |
Improve timeout calculation
gf
Diffstat (limited to 'src/connection.h')
-rw-r--r-- | src/connection.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/connection.h b/src/connection.h index b025a4dfc..516702cb8 100644 --- a/src/connection.h +++ b/src/connection.h @@ -162,16 +162,19 @@ inline bool seqnum_in_window(u16 seqnum, u16 next,u16 window_size) struct BufferedPacket { BufferedPacket(u8 *a_data, u32 a_size): - data(a_data, a_size), time(0.0), totaltime(0.0), absolute_send_time(-1) + data(a_data, a_size), time(0.0), totaltime(0.0), absolute_send_time(-1), + resend_count(0) {} BufferedPacket(u32 a_size): - data(a_size), time(0.0), totaltime(0.0), absolute_send_time(-1) + data(a_size), time(0.0), totaltime(0.0), absolute_send_time(-1), + resend_count(0) {} SharedBuffer<u8> data; // Data of the packet, including headers float time; // Seconds from buffering the packet or re-sending float totaltime; // Seconds from buffering the packet unsigned int absolute_send_time; Address address; // Sender or destination + unsigned int resend_count; }; // This adds the base headers to the data and makes a packet out of it |