refactor(netpacket): Simplify NetPacket functions for packet buffer writes and size tests#2329
refactor(netpacket): Simplify NetPacket functions for packet buffer writes and size tests#2329xezon wants to merge 5 commits intoTheSuperHackers:mainfrom
Conversation
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Source/GameNetwork/NetPacket.cpp | Removed ~3400 lines of boilerplate serialization code, replaced with virtual function calls |
| Core/GameEngine/Include/GameNetwork/NetPacketStructs.h | New file containing network packet structures with helper templates and serialization utilities |
| Core/GameEngine/Source/GameNetwork/NetPacketStructs.cpp | New file implementing packet serialization for all network command types |
| Core/GameEngine/Include/GameNetwork/NetCommandMsg.h | Added template base class, virtual serialization interface, consolidated ack message hierarchy |
| Core/GameEngine/Source/GameNetwork/NetCommandMsg.cpp | Simplified implementation by removing duplicate code in ack messages, added const correctness |
Last reviewed commit: 4f72f27
aea8b1a to
d8f9dc1
Compare
|
Would it make sense to use macros? For some of the repeating stuff like: |
|
Preferably a template. I will think about it. |
|
Replicated to Generals. |
d8f9dc1 to
9c9ffb9
Compare
Simplified in fixup commit with template. |
9c9ffb9 to
86faf0d
Compare
…NetAckStage1CommandMsg, NetAckStage2CommandMsg (#2329)
…NetCommandMsg::getSizeForNetPacket (#2329)
…rites and size tests (#2329)
86faf0d to
4f72f27
Compare
|
Goldfish:
|
Merge with Rebase
This change has 5 commits with refactors/fixes to greatly simplify all Net Packet buffer writes and size tests. All original networking behavior should be correctly preserved.
The only thing left to refactor for a follow up change are the Net Packet read functions.
TODO