• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

InternalPacket.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef __INTERNAL_PACKET_H
00019 #define __INTERNAL_PACKET_H
00020 
00021 #include "PacketPriority.h"
00022 #include "RakNetTypes.h"
00023 #include "RakMemoryOverride.h"
00024 #include "RakNetDefines.h"
00025 #include "CCRakNetUDT.h"
00026 #include "NativeTypes.h"
00027 
00028 typedef uint16_t SplitPacketIdType;
00029 typedef uint32_t SplitPacketIndexType;
00030 
00033 typedef uint24_t MessageNumberType;
00034 
00037 typedef MessageNumberType OrderingIndexType;
00038 
00039 typedef RakNetTimeUS RemoteSystemTimeType;
00040 
00041 struct InternalPacketFixedSizeTransmissionHeader
00042 {
00044         MessageNumberType reliableMessageNumber;
00046         OrderingIndexType orderingIndex;
00048         unsigned char orderingChannel;
00050         SplitPacketIdType splitPacketId;
00052         SplitPacketIndexType splitPacketIndex;
00054         SplitPacketIndexType splitPacketCount;;
00056         BitSize_t dataBitLength;
00058         PacketReliability reliability;
00059         // Not endian safe
00060         // unsigned char priority : 3;
00061         // unsigned char reliability : 5;
00062 };
00063 
00065 struct InternalPacketRefCountedData
00066 {
00067         unsigned char *sharedDataBlock;
00068         unsigned int refCount;
00069 };
00070 
00073 struct InternalPacket : public InternalPacketFixedSizeTransmissionHeader
00074 {
00076         MessageNumberType messageInternalOrder;
00080         bool messageNumberAssigned;
00082 //      bool allowWindowUpdate;
00084         RakNetTimeUS creationTime;
00086         RakNetTimeUS nextActionTime;
00087         // Size of the header when encoded into a bitstream
00088         BitSize_t headerLength;
00090         unsigned char *data;
00092         enum AllocationScheme
00093         {
00095                 NORMAL,
00096 
00098                 REF_COUNTED
00099         } allocationScheme;
00100         InternalPacketRefCountedData *refCountedData;
00102         unsigned char timesSent;
00104         PacketPriority priority;
00106         uint32_t sendReceiptSerial;
00107 
00108         // Used for the resend queue
00109         // Linked list implementation so I can remove from the list via a pointer, without finding it in the list
00110         InternalPacket *resendPrev, *resendNext,*unreliablePrev,*unreliableNext;
00111 };
00112 
00113 #endif
00114 

Generated on Thu Sep 30 2010 01:27:24 for RakNet by  doxygen 1.7.1