1 #ifndef BLANK_CLIENT_CHUNKRECEIVER_HPP_
2 #define BLANK_CLIENT_CHUNKRECEIVER_HPP_
4 #include "../app/IntervalTimer.hpp"
5 #include "../net/Packet.hpp"
18 class ChunkTransmission;
24 ChunkReceiver(Client &, ChunkStore &, const WorldSave &);
29 int ToLoad() const noexcept;
32 void LoadN(std::size_t n);
34 void StoreN(std::size_t n);
36 void Handle(const Packet::ChunkBegin &);
37 void Handle(const Packet::ChunkData &);
40 ChunkTransmission &GetTransmission(std::uint32_t id);
41 void Commit(ChunkTransmission &);
43 void ReRequest(ChunkTransmission &);
48 const WorldSave &save;
49 std::list<ChunkTransmission> transmissions;