diff --git a/raknet/RakPeer.cpp b/raknet/RakPeer.cpp index cdbba31..53f740d 100644 --- a/raknet/RakPeer.cpp +++ b/raknet/RakPeer.cpp @@ -8,6 +8,7 @@ RakPeer::RakPeer() { MTUSize = DEFAULT_MTU_SIZE; + trackFrequencyTable = false; maximumIncomingConnections = 0; maximumNumberOfPeers = 0; endThreads = true; @@ -435,9 +436,20 @@ void RakPeer::vftable_CC() // TODO: RakPeer::vftable_CC() (saco W: 100389C0) (server W: 4504C0 L: 806E110) (bot W: 404400 L: 807558A) } -void RakPeer::vftable_D0() +// -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +// Description: +// Enables or disables our tracking of bytes input to and output from the network. +// This is required to get a frequency table, which is used to generate a new compression layer. +// You can call this at any time - however you SHOULD only call it when disconnected. Otherwise you will only track +// part of the values sent over the network. +// This value persists between connect calls and defaults to false (no frequency tracking) +// +// Parameters: +// doCompile - true to track bytes. Defaults to false +// -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +void RakPeer::SetCompileFrequencyTable( bool doCompile ) { - // TODO: RakPeer::vftable_D0() (saco W: 10038A10) (server W: 450510 L: 806E170) (bot W: 404450 L: 80755EA) + trackFrequencyTable = doCompile; } void RakPeer::vftable_D4() diff --git a/raknet/RakPeer.h b/raknet/RakPeer.h index d3e3eb9..65318c7 100644 --- a/raknet/RakPeer.h +++ b/raknet/RakPeer.h @@ -145,7 +145,14 @@ public: void vftable_C4(); void vftable_C8(); void vftable_CC(); - void vftable_D0(); + + // --------------------------------------------------------------------------------------------Compression Functions - Functions related to the compression layer-------------------------------------------------------------------------------------------- + /// Enables or disables frequency table tracking. This is required to get a frequency table, which is used in GenerateCompressionLayer() + /// This value persists between connect calls and defaults to false (no frequency tracking) + /// \pre You can call this at any time - however you SHOULD only call it when disconnected. Otherwise you will only trackpart of the values sent over the network. + /// \param[in] doCompile True to enable tracking + void SetCompileFrequencyTable( bool doCompile ); + void vftable_D4(); void vftable_D8(); void vftable_DC(); diff --git a/raknet/RakPeerInterface.h b/raknet/RakPeerInterface.h index 8180ef6..f3ee047 100644 --- a/raknet/RakPeerInterface.h +++ b/raknet/RakPeerInterface.h @@ -141,7 +141,14 @@ public: virtual void vftable_C4()=0; virtual void vftable_C8()=0; virtual void vftable_CC()=0; - virtual void vftable_D0()=0; + + // --------------------------------------------------------------------------------------------Compression Functions - Functions related to the compression layer-------------------------------------------------------------------------------------------- + /// Enables or disables frequency table tracking. This is required to get a frequency table, which is used in GenerateCompressionLayer() + /// This value persists between connect calls and defaults to false (no frequency tracking) + /// \pre You can call this at any time - however you SHOULD only call it when disconnected. Otherwise you will only trackpart of the values sent over the network. + /// \param[in] doCompile True to enable tracking + virtual void SetCompileFrequencyTable( bool doCompile )=0; + virtual void vftable_D4()=0; virtual void vftable_D8()=0; virtual void vftable_DC()=0;