aboutsummaryrefslogtreecommitdiff
path: root/src/connection.h
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-07-12 15:58:08 +0200
committersapier <Sapier at GMX dot net>2014-08-22 20:56:16 +0200
commit247a1ebf2317556eea79a018fb236a0145e55121 (patch)
treeb8f79437fab71d899de96a4a06bb536262927c99 /src/connection.h
parent944ffe9e532a3b2be686ef28c33313148760b1c9 (diff)
downloadminetest-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.h7
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