enum EUdpPacketType { Invalid = 0; ChallengeReq = 1; Challenge = 2; Connect = 3; Accept = 4; Disconnect = 5; Data = 6; Datagram = 7; Max = 8; }; class UdpHeader { const uint MAGIC = 0x31305356; uint magic = UdpHeader::MAGIC; ushort payloadSize; EUdpPacketType packetType = EUdpPacketType::Invalid; byte flags; uint sourceConnID = 512; uint destConnID; uint seqThis; uint seqAck; uint packetsInMsg; uint msgStartSeq; uint msgSize; }; class ChallengeData { const uint CHALLENGE_MASK = 0xA426DF2B; uint challengeValue; uint serverLoad; }; class ConnectData { const uint CHALLENGE_MASK = ChallengeData::CHALLENGE_MASK; uint challengeValue; }; class Accept { }; class Datagram { }; class Disconnect { };