better example

This commit is contained in:
2025-02-18 19:09:40 +01:00
parent baa52d3baa
commit 2eab50932f
4 changed files with 45 additions and 23 deletions

View File

@@ -3,13 +3,15 @@
enum PacketId {
KeepAlive = 0,
Disconnect,
UpgradeTower,
};
#include <examples/KeepAlivePacket.h>
#include <examples/DisconnectPacket.h>
#include <examples/UpgradeTowerPacket.h>
// they must be in the same order !
using AllPackets = std::tuple<KeepAlivePacket, DisconnectPacket>;
// they must be in the same order as in the enum !
using AllPackets = std::tuple<KeepAlivePacket, DisconnectPacket, UpgradeTowerPacket>;
#include <sp/default/DefaultPacketHandler.h>
#include <sp/default/DefaultPacketFactory.h>