32 lines
641 B
C++
32 lines
641 B
C++
#pragma once
|
|
|
|
#include "blitz/protocol/Protocol.h"
|
|
|
|
namespace blitz {
|
|
namespace protocol {
|
|
|
|
class KeepAlivePacket : public Packet {
|
|
private:
|
|
std::uint64_t m_AliveID;
|
|
|
|
public:
|
|
KeepAlivePacket() {}
|
|
KeepAlivePacket(std::uint64_t aliveID) : m_AliveID(aliveID) {}
|
|
virtual ~KeepAlivePacket() {}
|
|
|
|
virtual DataBuffer Serialize(bool packetID = true) const;
|
|
virtual void Deserialize(DataBuffer& data);
|
|
virtual void Dispatch(PacketHandler* handler) const;
|
|
|
|
std::uint64_t GetAliveID() const {
|
|
return m_AliveID;
|
|
}
|
|
|
|
virtual PacketType GetType() const {
|
|
return PacketType::KeepAlive;
|
|
}
|
|
};
|
|
|
|
} // namespace protocol
|
|
} // namespace blitz
|