Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
connection_internal.h
Go to the documentation of this file.
1/*
2Minetest
3Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation; either version 2.1 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License along
16with this program; if not, write to the Free Software Foundation, Inc.,
1751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*/
19
20#pragma once
21
22/********************************************/
23/* may only be included from in src/network */
24/********************************************/
25
26#include "connection.h"
27
28#define MAX_UDP_PEERS 65535
29
30/*
31=== NOTES ===
32
33A packet is sent through a channel to a peer with a basic header:
34 Header (7 bytes):
35 [0] u32 protocol_id
36 [4] session_t sender_peer_id
37 [6] u8 channel
38sender_peer_id:
39 Unique to each peer.
40 value 0 (PEER_ID_INEXISTENT) is reserved for making new connections
41 value 1 (PEER_ID_SERVER) is reserved for server
42 these constants are defined in constants.h
43channel:
44 Channel numbers have no intrinsic meaning. Currently only 0, 1, 2 exist.
45*/
46#define BASE_HEADER_SIZE 7
47#define CHANNEL_COUNT 3
48
49/*
50Packet types:
51
52CONTROL: This is a packet used by the protocol.
53- When this is processed, nothing is handed to the user.
54 Header (2 byte):
55 [0] u8 type
56 [1] u8 controltype
57controltype and data description:
58 CONTROLTYPE_ACK
59 [2] u16 seqnum
60 CONTROLTYPE_SET_PEER_ID
61 [2] session_t peer_id_new
62 CONTROLTYPE_PING
63 - There is no actual reply, but this can be sent in a reliable
64 packet to get a reply
65 CONTROLTYPE_DISCO
66*/
67enum ControlType : u8 {
72};
73
74/*
75ORIGINAL: This is a plain packet with no control and no error
76checking at all.
77- When this is processed, it is directly handed to the user.
78 Header (1 byte):
79 [0] u8 type
80*/
81//#define TYPE_ORIGINAL 1
82#define ORIGINAL_HEADER_SIZE 1
83
84/*
85SPLIT: These are sequences of packets forming one bigger piece of
86data.
87- When processed and all the packet_nums 0...packet_count-1 are
88 present (this should be buffered), the resulting data shall be
89 directly handed to the user.
90- If the data fails to come up in a reasonable time, the buffer shall
91 be silently discarded.
92- These can be sent as-is or atop of a RELIABLE packet stream.
93 Header (7 bytes):
94 [0] u8 type
95 [1] u16 seqnum
96 [3] u16 chunk_count
97 [5] u16 chunk_num
98*/
99//#define TYPE_SPLIT 2
100
101/*
102RELIABLE: Delivery of all RELIABLE packets shall be forced by ACKs,
103and they shall be delivered in the same order as sent. This is done
104with a buffer in the receiving and transmitting end.
105- When this is processed, the contents of each packet is recursively
106 processed as packets.
107 Header (3 bytes):
108 [0] u8 type
109 [1] u16 seqnum
110
111*/
112//#define TYPE_RELIABLE 3
113#define RELIABLE_HEADER_SIZE 3
114#define SEQNUM_INITIAL 65500
115#define SEQNUM_MAX 65535
116
117namespace con
118{
119
120
121enum PacketType : u8 {
128
129inline bool seqnum_higher(u16 totest, u16 base)
130{
131 if (totest > base)
132 {
133 if ((totest - base) > (SEQNUM_MAX/2))
134 return false;
135
136 return true;
137 }
138
139 if ((base - totest) > (SEQNUM_MAX/2))
140 return true;
141
142 return false;
143}
144
145inline bool seqnum_in_window(u16 seqnum, u16 next,u16 window_size)
146{
147 u16 window_start = next;
148 u16 window_end = ( next + window_size ) % (SEQNUM_MAX+1);
149
150 if (window_start < window_end) {
151 return ((seqnum >= window_start) && (seqnum < window_end));
152 }
153
154
155 return ((seqnum < window_end) || (seqnum >= window_start));
156}
157
158inline float CALC_DTIME(u64 lasttime, u64 curtime)
159{
160 float value = (curtime - lasttime) / 1000.0f;
161 return MYMAX(MYMIN(value, 0.1f), 0.0f);
162}
163
164
165/*
166 Struct for all kinds of packets. Includes following data:
167 BASE_HEADER
168 u8[] packet data (usually copied from SharedBuffer<u8>)
169*/
171 BufferedPacket(u32 a_size)
172 {
173 m_data.resize(a_size);
174 data = &m_data[0];
175 }
176
178
179 u16 getSeqnum() const;
180
181 inline size_t size() const { return m_data.size(); }
182
183 u8 *data; // Direct memory access
184 float time = 0.0f; // Seconds from buffering the packet or re-sending
185 float totaltime = 0.0f; // Seconds from buffering the packet
187 Address address; // Sender or destination
188 unsigned int resend_count = 0;
189
190private:
191 std::vector<u8> m_data; // Data of the packet, including headers
192};
193
194
195// This adds the base headers to the data and makes a packet out of it
196BufferedPacketPtr makePacket(const Address &address, const SharedBuffer<u8> &data,
197 u32 protocol_id, session_t sender_peer_id, u8 channel);
198
199// Depending on size, make a TYPE_ORIGINAL or TYPE_SPLIT packet
200// Increments split_seqnum if a split packet is made
201void makeAutoSplitPacket(const SharedBuffer<u8> &data, u32 chunksize_max,
202 u16 &split_seqnum, std::list<SharedBuffer<u8>> *list);
203
204// Add the TYPE_RELIABLE header to the data
206
208{
209 IncomingSplitPacket(u32 cc, bool r):
210 chunk_count(cc), reliable(r) {}
211
213
214 float time = 0.0f; // Seconds from adding
216 bool reliable; // If true, isn't deleted on timeout
217
218 bool allReceived() const
219 {
220 return (chunks.size() == chunk_count);
221 }
222 bool insert(u32 chunk_num, SharedBuffer<u8> &chunkdata);
224
225private:
226 // Key is chunk number, value is data without headers
227 std::map<u16, SharedBuffer<u8>> chunks;
228};
229
230/*
231 A buffer which stores reliable packets and sorts them internally
232 for fast access to the smallest one.
233*/
234
236{
237public:
238 bool getFirstSeqnum(u16 &result);
239
241 BufferedPacketPtr popSeqnum(u16 seqnum);
242 void insert(BufferedPacketPtr &p_ptr, u16 next_expected);
243
244 void incrementTimeouts(float dtime);
245 u32 getTimedOuts(float timeout);
246 // timeout relative to last resend
247 std::vector<ConstSharedPtr<BufferedPacket>> getResend(float timeout, u32 max_packets);
248
249 void print();
250 bool empty();
251 u32 size();
252
253
254private:
255 typedef std::list<BufferedPacketPtr>::iterator FindResult;
256
257 FindResult findPacketNoLock(u16 seqnum);
258
259 std::list<BufferedPacketPtr> m_list;
260
262
263 std::mutex m_list_mutex;
264};
265
266/*
267 A buffer for reconstructing split packets
268*/
269
271{
272public:
274
275 /*
276 Returns a reference counted buffer of length != 0 when a full split
277 packet is constructed. If not, returns one of length 0.
278 */
279 SharedBuffer<u8> insert(BufferedPacketPtr &p_ptr, bool reliable);
280
281 void removeUnreliableTimedOuts(float dtime, float timeout);
282
283private:
284 // Key is seqnum
285 std::map<u16, IncomingSplitPacket*> m_buf;
286
287 std::mutex m_map_mutex;
288};
289
302
303// This is very similar to ConnectionEvent
305{
311 bool reliable = false;
312 bool raw = false;
313
315
324
325private:
327 type(type_) {}
328
330};
331
332/* maximum window size to use, 0xFFFF is theoretical maximum. don't think about
333 * touching it, the less you're away from it the more likely data corruption
334 * will occur
335 */
336#define MAX_RELIABLE_WINDOW_SIZE 0x8000
337/* starting value for window size */
338#define START_RELIABLE_WINDOW_SIZE 0x400
339/* minimum value for window size */
340#define MIN_RELIABLE_WINDOW_SIZE 0x40
341
343{
344
345public:
348
349 u16 getOutgoingSequenceNumber(bool& successful);
351 bool putBackSequenceNumber(u16);
352
354 void setNextSplitSeqNum(u16 seqnum);
355
356 // This is for buffering the incoming packets that are coming in
357 // the wrong order
359 // This is for buffering the sent packets so that the sender can
360 // re-send them if no ACK is received
362
363 //queued reliable packets
364 std::queue<BufferedPacketPtr> queued_reliables;
365
366 //queue commands prior splitting to packets
367 std::deque<ConnectionCommandPtr> queued_commands;
368
370
371 Channel() = default;
372 ~Channel() = default;
373
374 void UpdatePacketLossCounter(unsigned int count);
376 void UpdateBytesSent(unsigned int bytes,unsigned int packages=1);
377 void UpdateBytesLost(unsigned int bytes);
378 void UpdateBytesReceived(unsigned int bytes);
379
380 void UpdateTimers(float dtime);
381
383 { MutexAutoLock lock(m_internal_mutex); return cur_kbps; };
385 { MutexAutoLock lock(m_internal_mutex); return max_kbps; };
386
391
396
398 { MutexAutoLock lock(m_internal_mutex); return avg_kbps; };
403
404 u16 getWindowSize() const { return m_window_size; };
405
406 void setWindowSize(long size)
407 {
409 }
410
411private:
414
416
419
420 unsigned int current_packet_loss = 0;
421 unsigned int current_packet_too_late = 0;
424
425 unsigned int current_bytes_transfered = 0;
426 unsigned int current_bytes_received = 0;
427 unsigned int current_bytes_lost = 0;
428 float max_kbps = 0.0f;
429 float cur_kbps = 0.0f;
430 float avg_kbps = 0.0f;
431 float max_incoming_kbps = 0.0f;
432 float cur_incoming_kbps = 0.0f;
433 float avg_incoming_kbps = 0.0f;
434 float max_kbps_lost = 0.0f;
435 float cur_kbps_lost = 0.0f;
436 float avg_kbps_lost = 0.0f;
437 float bpm_counter = 0.0f;
438
439 unsigned int rate_samples = 0;
440};
441
442
443class UDPPeer final : public Peer
444{
445public:
446
447 friend class PeerHelper;
450 friend class Connection;
451
452 UDPPeer(session_t id, const Address &address, Connection *connection);
453 virtual ~UDPPeer() = default;
454
456 unsigned int max_packet_size) override;
457
458 virtual const Address &getAddress() const {
459 return address;
460 }
461
462 u16 getNextSplitSequenceNumber(u8 channel) override;
463 void setNextSplitSequenceNumber(u8 channel, u16 seqnum) override;
464
466 bool reliable) override;
467
468 bool isTimedOut(float timeout, std::string &reason) override;
469
470protected:
471 /*
472 Calculates avg_rtt and resend_timeout.
473 rtt=-1 only recalculates resend_timeout
474 */
475 void reportRTT(float rtt) override;
476
477 void RunCommandQueues(
478 unsigned int max_packet_size,
479 unsigned int maxtransfer);
480
483
484 void setResendTimeout(float timeout)
486
487 bool Ping(float dtime, SharedBuffer<u8>& data) override;
488
491private:
492 // This is changed dynamically
493 float resend_timeout = 0.5;
494
497 unsigned int max_packet_size);
498};
499
500}
#define DISABLE_CLASS_COPY(C)
Definition: basic_macros.h:35
#define MYMIN(a, b)
Definition: basic_macros.h:24
#define MYMAX(a, b)
Definition: basic_macros.h:26
Definition: address.h:43
Definition: pointer.h:44
Definition: networkpacket.h:27
Definition: pointer.h:162
Definition: connection_internal.h:343
void UpdateBytesLost(unsigned int bytes)
Definition: connection.cpp:715
u16 getOutgoingSequenceNumber(bool &successful)
Definition: connection.cpp:648
u16 m_window_size
Definition: connection_internal.h:413
unsigned int current_packet_loss
Definition: connection_internal.h:420
void UpdatePacketTooLateCounter()
Definition: connection.cpp:728
float getAvgLossRateKB()
Definition: connection_internal.h:399
u16 readNextIncomingSeqNum()
Definition: connection.cpp:623
float getCurrentLossRateKB()
Definition: connection_internal.h:387
float cur_incoming_kbps
Definition: connection_internal.h:432
void UpdateTimers(float dtime)
Definition: connection.cpp:734
u16 getWindowSize() const
Definition: connection_internal.h:404
u16 next_outgoing_split_seqnum
Definition: connection_internal.h:418
unsigned int current_packet_too_late
Definition: connection_internal.h:421
float bpm_counter
Definition: connection_internal.h:437
float avg_incoming_kbps
Definition: connection_internal.h:433
float getMaxLossRateKB()
Definition: connection_internal.h:389
unsigned int current_packet_successful
Definition: connection_internal.h:422
float max_kbps
Definition: connection_internal.h:428
float max_incoming_kbps
Definition: connection_internal.h:431
float getAvgIncomingRateKB()
Definition: connection_internal.h:401
ReliablePacketBuffer outgoing_reliables_sent
Definition: connection_internal.h:361
~Channel()=default
float getAvgDownloadRateKB()
Definition: connection_internal.h:397
std::deque< ConnectionCommandPtr > queued_commands
Definition: connection_internal.h:367
float getMaxIncomingRateKB()
Definition: connection_internal.h:394
void UpdateBytesSent(unsigned int bytes, unsigned int packages=1)
Definition: connection.cpp:703
float avg_kbps_lost
Definition: connection_internal.h:436
u16 incNextIncomingSeqNum()
Definition: connection.cpp:629
bool putBackSequenceNumber(u16)
Definition: connection.cpp:693
void UpdateBytesReceived(unsigned int bytes)
Definition: connection.cpp:710
ReliablePacketBuffer incoming_reliables
Definition: connection_internal.h:358
float packet_loss_counter
Definition: connection_internal.h:423
u16 readNextSplitSeqNum()
Definition: connection.cpp:637
float max_kbps_lost
Definition: connection_internal.h:434
u16 next_incoming_seqnum
Definition: connection_internal.h:415
unsigned int current_bytes_transfered
Definition: connection_internal.h:425
float avg_kbps
Definition: connection_internal.h:430
void setWindowSize(long size)
Definition: connection_internal.h:406
IncomingSplitBuffer incoming_splits
Definition: connection_internal.h:369
unsigned int current_bytes_lost
Definition: connection_internal.h:427
void UpdatePacketLossCounter(unsigned int count)
Definition: connection.cpp:722
float getCurrentDownloadRateKB()
Definition: connection_internal.h:382
std::mutex m_internal_mutex
Definition: connection_internal.h:412
float getMaxDownloadRateKB()
Definition: connection_internal.h:384
float getCurrentIncomingRateKB()
Definition: connection_internal.h:392
void setNextSplitSeqNum(u16 seqnum)
Definition: connection.cpp:642
float cur_kbps
Definition: connection_internal.h:429
std::queue< BufferedPacketPtr > queued_reliables
Definition: connection_internal.h:364
u16 next_outgoing_seqnum
Definition: connection_internal.h:417
unsigned int current_bytes_received
Definition: connection_internal.h:426
u16 readOutgoingSequenceNumber()
Definition: connection.cpp:687
float cur_kbps_lost
Definition: connection_internal.h:435
Channel()=default
unsigned int rate_samples
Definition: connection_internal.h:439
Definition: connectionthreads.h:114
Definition: connectionthreads.h:56
Definition: connection.h:255
Definition: connection_internal.h:271
std::mutex m_map_mutex
Definition: connection_internal.h:287
std::map< u16, IncomingSplitPacket * > m_buf
Definition: connection_internal.h:285
SharedBuffer< u8 > insert(BufferedPacketPtr &p_ptr, bool reliable)
Definition: connection.cpp:453
void removeUnreliableTimedOuts(float dtime, float timeout)
Definition: connection.cpp:520
~IncomingSplitBuffer()
Definition: connection.cpp:445
Definition: connection.h:56
Definition: connection.h:122
Address address
Definition: connection.h:216
std::mutex m_exclusive_access_mutex
Definition: connection.h:209
Definition: connection_internal.h:236
void incrementTimeouts(float dtime)
Definition: connection.cpp:355
std::list< BufferedPacketPtr >::iterator FindResult
Definition: connection_internal.h:255
u16 m_oldest_non_answered_ack
Definition: connection_internal.h:261
BufferedPacketPtr popSeqnum(u16 seqnum)
Definition: connection.cpp:230
u32 size()
Definition: connection.cpp:189
std::vector< ConstSharedPtr< BufferedPacket > > getResend(float timeout, u32 max_packets)
Definition: connection.cpp:376
std::mutex m_list_mutex
Definition: connection_internal.h:263
BufferedPacketPtr popFirst()
Definition: connection.cpp:213
bool empty()
Definition: connection.cpp:183
std::list< BufferedPacketPtr > m_list
Definition: connection_internal.h:259
void print()
Definition: connection.cpp:172
u32 getTimedOuts(float timeout)
Definition: connection.cpp:364
void insert(BufferedPacketPtr &p_ptr, u16 next_expected)
Definition: connection.cpp:251
FindResult findPacketNoLock(u16 seqnum)
Definition: connection.cpp:195
bool getFirstSeqnum(u16 &result)
Definition: connection.cpp:204
Definition: connection_internal.h:444
bool processReliableSendCommand(ConnectionCommandPtr &c_ptr, unsigned int max_packet_size)
Definition: connection.cpp:1052
void setNextSplitSequenceNumber(u8 channel, u16 seqnum) override
Definition: connection.cpp:1193
void RunCommandQueues(unsigned int max_packet_size, unsigned int maxtransfer)
Definition: connection.cpp:1155
void reportRTT(float rtt) override
Definition: connection.cpp:990
virtual const Address & getAddress() const
Definition: connection_internal.h:458
bool isTimedOut(float timeout, std::string &reason) override
Definition: connection.cpp:972
void PutReliableSendCommand(ConnectionCommandPtr &c, unsigned int max_packet_size) override
Definition: connection.cpp:1021
bool m_pending_disconnect
Definition: connection_internal.h:490
Channel channels[CHANNEL_COUNT]
Definition: connection_internal.h:489
float resend_timeout
Definition: connection_internal.h:493
u16 getNextSplitSequenceNumber(u8 channel) override
Definition: connection.cpp:1187
virtual ~UDPPeer()=default
void setResendTimeout(float timeout)
Definition: connection_internal.h:484
float getResendTimeout()
Definition: connection_internal.h:481
bool Ping(float dtime, SharedBuffer< u8 > &data) override
Definition: connection.cpp:1007
SharedBuffer< u8 > addSplitPacket(u8 channel, BufferedPacketPtr &toadd, bool reliable) override
Definition: connection.cpp:1199
#define SEQNUM_MAX
Definition: connection_internal.h:115
#define CHANNEL_COUNT
Definition: connection_internal.h:47
ControlType
Definition: connection_internal.h:67
@ CONTROLTYPE_PING
Definition: connection_internal.h:70
@ CONTROLTYPE_ACK
Definition: connection_internal.h:68
@ CONTROLTYPE_DISCO
Definition: connection_internal.h:71
@ CONTROLTYPE_SET_PEER_ID
Definition: connection_internal.h:69
#define MIN_RELIABLE_WINDOW_SIZE
Definition: connection_internal.h:340
#define MAX_RELIABLE_WINDOW_SIZE
Definition: connection_internal.h:336
#define SEQNUM_INITIAL
Definition: connection_internal.h:114
#define PEER_ID_INEXISTENT
Definition: constants.h:34
std::unique_lock< std::mutex > MutexAutoLock
Definition: mutex_auto_lock.h:29
Definition: client.h:73
bool seqnum_in_window(u16 seqnum, u16 next, u16 window_size)
Definition: connection_internal.h:145
SharedBuffer< u8 > makeReliablePacket(const SharedBuffer< u8 > &data, u16 seqnum)
Definition: connection.cpp:154
PacketType
Definition: connection_internal.h:121
@ PACKET_TYPE_CONTROL
Definition: connection_internal.h:122
@ PACKET_TYPE_RELIABLE
Definition: connection_internal.h:125
@ PACKET_TYPE_MAX
Definition: connection_internal.h:126
@ PACKET_TYPE_SPLIT
Definition: connection_internal.h:124
@ PACKET_TYPE_ORIGINAL
Definition: connection_internal.h:123
void makeAutoSplitPacket(const SharedBuffer< u8 > &data, u32 chunksize_max, u16 &split_seqnum, std::list< SharedBuffer< u8 > > *list)
Definition: connection.cpp:140
ConnectionCommandType
Definition: connection_internal.h:290
@ CONNCMD_RESEND_ONE
Definition: connection_internal.h:300
@ CONNCMD_CONNECT
Definition: connection_internal.h:293
@ CONNCMD_SEND
Definition: connection_internal.h:296
@ CONNCMD_SERVE
Definition: connection_internal.h:292
@ CONNCMD_DISCONNECT_PEER
Definition: connection_internal.h:295
@ CONNCMD_SEND_TO_ALL
Definition: connection_internal.h:297
@ CONNCMD_NONE
Definition: connection_internal.h:291
@ CONCMD_CREATE_PEER
Definition: connection_internal.h:299
@ CONNCMD_DISCONNECT
Definition: connection_internal.h:294
@ CONCMD_ACK
Definition: connection_internal.h:298
std::shared_ptr< BufferedPacket > BufferedPacketPtr
Definition: connection.h:117
float CALC_DTIME(u64 lasttime, u64 curtime)
Definition: connection_internal.h:158
std::shared_ptr< ConnectionCommand > ConnectionCommandPtr
Definition: connection.h:114
BufferedPacketPtr makePacket(const Address &address, const SharedBuffer< u8 > &data, u32 protocol_id, session_t sender_peer_id, u8 channel)
Definition: connection.cpp:71
bool seqnum_higher(u16 totest, u16 base)
Definition: connection_internal.h:129
u16 session_t
Definition: networkprotocol.h:251
#define rangelim(d, min, max)
Definition: numeric.h:32
Definition: connection_internal.h:170
u8 * data
Definition: connection_internal.h:183
Address address
Definition: connection_internal.h:187
size_t size() const
Definition: connection_internal.h:181
u64 absolute_send_time
Definition: connection_internal.h:186
unsigned int resend_count
Definition: connection_internal.h:188
float time
Definition: connection_internal.h:184
std::vector< u8 > m_data
Definition: connection_internal.h:191
u16 getSeqnum() const
Definition: connection.cpp:63
float totaltime
Definition: connection_internal.h:185
BufferedPacket(u32 a_size)
Definition: connection_internal.h:171
Definition: connection_internal.h:305
static ConnectionCommandPtr connect(Address address)
Definition: connection.cpp:559
static ConnectionCommandPtr ack(session_t peer_id, u8 channelnum, const Buffer< u8 > &data)
Definition: connection.cpp:598
static ConnectionCommandPtr create(ConnectionCommandType type)
Definition: connection.cpp:547
static ConnectionCommandPtr disconnect_peer(session_t peer_id)
Definition: connection.cpp:571
u8 channelnum
Definition: connection_internal.h:309
static ConnectionCommandPtr createPeer(session_t peer_id, const Buffer< u8 > &data)
Definition: connection.cpp:608
Buffer< u8 > data
Definition: connection_internal.h:310
Address address
Definition: connection_internal.h:307
bool reliable
Definition: connection_internal.h:311
ConnectionCommand(ConnectionCommandType type_)
Definition: connection_internal.h:326
static ConnectionCommandPtr disconnect()
Definition: connection.cpp:566
bool raw
Definition: connection_internal.h:312
static ConnectionCommandPtr send(session_t peer_id, u8 channelnum, NetworkPacket *pkt, bool reliable)
Definition: connection.cpp:587
session_t peer_id
Definition: connection_internal.h:308
const ConnectionCommandType type
Definition: connection_internal.h:306
static ConnectionCommandPtr resend_one(session_t peer_id)
Definition: connection.cpp:578
DISABLE_CLASS_COPY(ConnectionCommand)
static ConnectionCommandPtr serve(Address address)
Definition: connection.cpp:552
Definition: connection_internal.h:208
u32 chunk_count
Definition: connection_internal.h:215
bool allReceived() const
Definition: connection_internal.h:218
SharedBuffer< u8 > reassemble()
Definition: connection.cpp:419
IncomingSplitPacket(u32 cc, bool r)
Definition: connection_internal.h:209
bool reliable
Definition: connection_internal.h:216
bool insert(u32 chunk_num, SharedBuffer< u8 > &chunkdata)
Definition: connection.cpp:403
std::map< u16, SharedBuffer< u8 > > chunks
Definition: connection_internal.h:227
float time
Definition: connection_internal.h:214