From: <sv...@ww...> - 2004-05-29 20:13:10
|
Author: wolverine Date: 2004-05-29 13:13:04 -0700 (Sat, 29 May 2004) New Revision: 975 Modified: trunk/CSP/CSPSim/Include/Networking.h Log: added packing to the network structures. Modified: trunk/CSP/CSPSim/Include/Networking.h =================================================================== --- trunk/CSP/CSPSim/Include/Networking.h 2004-05-29 18:59:11 UTC (rev 974) +++ trunk/CSP/CSPSim/Include/Networking.h 2004-05-29 20:13:04 UTC (rev 975) @@ -47,6 +47,32 @@ const short NETWORK_PACKET_SIZE = 512; +#ifdef WIN32 +#pragma pack(push) +#pragma pack(1) +#endif + + +// Define some structs that will only used for data transfers. +// These differ from SimData structs in that they have no virtual +// functions and hence have more predictable binary sizes. +struct _Vector3Struct +{ + double x; + double y; + double z; +}; + +struct _QuatStruct +{ + double x; + double y; + double z; + double w; +}; + + + struct MessageHeader { simdata::uint16 m_magicNumber; @@ -118,33 +144,9 @@ }; -class NetworkMessagePool +struct ObjectUpdateMessagePayload { - -}; - -// Define some structs that will only used for data transfers. -// These differ from SimData structs in that they have no virtual -// functions and hence have more predictable binary sizes. -struct _Vector3Struct -{ - double x; - double y; - double z; -}; - -struct _QuatStruct -{ - double x; - double y; - double z; - double w; -}; - -class ObjectUpdateMessagePayload -{ - private: ObjectUpdateMessagePayload(); @@ -176,7 +178,17 @@ }; +#ifdef WIN32 +#pragma pack(pop) +#endif +class NetworkMessagePool +{ + + +}; + + class NetworkNode { private: |