2018-04-15 21:52:13 +00:00
|
|
|
#pragma once
|
|
|
|
#include "../../util/Serializable.h"
|
|
|
|
#include <cstdint>
|
2018-04-22 16:11:12 +00:00
|
|
|
#include <iostream>
|
2018-04-15 21:52:13 +00:00
|
|
|
|
|
|
|
namespace ki
|
|
|
|
{
|
|
|
|
namespace protocol
|
|
|
|
{
|
|
|
|
namespace control
|
|
|
|
{
|
|
|
|
class ServerKeepAlive final : public util::Serializable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ServerKeepAlive(uint32_t timestamp = 0);
|
|
|
|
virtual ~ServerKeepAlive() = default;
|
|
|
|
|
|
|
|
uint32_t get_timestamp() const;
|
|
|
|
void set_timestamp(uint32_t timestamp);
|
|
|
|
|
|
|
|
void write_to(std::ostream &ostream) const override final;
|
|
|
|
void read_from(std::istream &istream) override final;
|
|
|
|
size_t get_size() const override final;
|
|
|
|
private:
|
|
|
|
uint32_t m_timestamp;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|