RakNet  4.0
Public Types | Public Attributes | List of all members
RakNet::InternalPacket Struct Reference

#include <InternalPacket.h>

Inherits RakNet::InternalPacketFixedSizeTransmissionHeader.

Public Types

enum  AllocationScheme { NORMAL, REF_COUNTED, STACK }
 How to alloc and delete the data member. More...
 

Public Attributes

MessageNumberType messageInternalOrder
 Identifies the order in which this number was sent. Used locally.
 
bool messageNumberAssigned
 
RakNet::TimeUS creationTime
 Was this packet number used this update to track windowing drops or increases? Each packet number is only used once per update.
 
RakNet::TimeUS nextActionTime
 The resendNext time to take action on this packet.
 
unsigned char * data
 Buffer is a pointer to the actual data, assuming this packet has data at all.
 
unsigned char timesSent
 How many attempts we made at sending this message.
 
PacketPriority priority
 The priority level of this packet.
 
uint32_t sendReceiptSerial
 If the reliability type requires a receipt, then return this number with it.
 
- Public Attributes inherited from RakNet::InternalPacketFixedSizeTransmissionHeader
MessageNumberType reliableMessageNumber
 A unique numerical identifier given to this user message. Used to identify reliable messages on the network.
 
OrderingIndexType orderingIndex
 The ID used as identification for ordering messages. Also included in sequenced messages.
 
unsigned char orderingChannel
 What ordering channel this packet is on, if the reliability type uses ordering channels.
 
SplitPacketIdType splitPacketId
 The ID of the split packet, if we have split packets. This is the maximum number of split messages we can send simultaneously per connection.
 
SplitPacketIndexType splitPacketIndex
 If this is a split packet, the index into the array of subsplit packets.
 
SplitPacketIndexType splitPacketCount
 The size of the array of subsplit packets.
 
BitSize_t dataBitLength
 How many bits long the data is.
 
PacketReliability reliability
 What type of reliability algorithm to use with this packet.
 

Detailed Description

Holds a user message, and related information Don't use a constructor or destructor, due to the memory pool I am using

Member Enumeration Documentation

How to alloc and delete the data member.

Enumerator:
NORMAL 

Data is allocated using rakMalloc. Just free it.

REF_COUNTED 

data points to a larger block of data, where the larger block is reference counted. internalPacketRefCountedData is used in this case

STACK 

If allocation scheme is STACK, data points to stackData and should not be deallocated This is only used when sending. Received packets are deallocated in RakPeer

Member Data Documentation

RakNet::TimeUS RakNet::InternalPacket::creationTime

Was this packet number used this update to track windowing drops or increases? Each packet number is only used once per update.

When this packet was created

bool RakNet::InternalPacket::messageNumberAssigned

Has this message number been assigned yet? We don't assign until the message is actually sent. This fixes a bug where pre-determining message numbers and then sending a message on a different channel creates a huge gap. This causes performance problems and causes those messages to timeout.


The documentation for this struct was generated from the following file: