====== DSR P2P Communication ====== DSR P2P communication is a nested protocol, which uses the steam API to send P2P packets. The upper layer, a raw P2P packet, encapsulates the entire P2P system. It's 1st byte is the the following enum: enum EPacketType : uint8_t { ePacketType_GameData = 0, ePacketType_P2PProtocol = 1, ePacketType_Voice = 2, ePacketType_P2PInit = 3, //Essentially just an unencrypted P2P protocol packet ePacketDataType = 7, //Test ePacketType_UDP = 1 << 3, ePacketType_TCP = 1 << 4, ePacketType_Encrypted = 1 << 6, }; The function SteamNetworking::SendRawP2PPacketType @1410ba220 sends the packet. The function SteamNetworking::ParseRawP2PPacketType @01410B5340 is responsible for reading this byte, then based on that either treats it as a Steam Communication packet, or a GameData Communication packet. The raw P2PPacket also includes checksum data and encryption variables. These are the packet types that can be contained in a RawP2PPacket: [[topic:DSR Steam Communication]]. It handles session connectivity, lobby creation, and connecting. It is parsed immediately upon receiving. [[topic:DSR GameData Communication]]. It handles sending game data such as player position, animations, and character info. Upon receiving it is put in a queue, and later grabbed from that queue and parsed.