X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fconnection.h;h=516702cb8e19daa5639b0db0749bfcc711df0117;hb=55c646c5c2b40931d24be8541b3056ab3322a70f;hp=338ee964ce36378ff4aff16579ef4255aa6befe2;hpb=09e8bbea03c72cfc21560f953561183b9d29be6a;p=oweals%2Fminetest.git diff --git a/src/connection.h b/src/connection.h index 338ee964c..516702cb8 100644 --- a/src/connection.h +++ b/src/connection.h @@ -120,9 +120,9 @@ public: }; typedef enum MTProtocols { - PRIMARY, - UDP, - MINETEST_RELIABLE_UDP + MTP_PRIMARY, + MTP_UDP, + MTP_MINETEST_RELIABLE_UDP } MTProtocols; #define SEQNUM_MAX 65535 @@ -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 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