#define BLANK_SERVER_SERVER_HPP
#include "../app/Config.hpp"
+#include "../shared/CLI.hpp"
#include "../world/World.hpp"
#include "../world/WorldManipulator.hpp"
+#include <cstdint>
#include <list>
#include <SDL_net.h>
void SetBlock(Chunk &, int, const Block &) override;
+ /// for use by client connections when they receive a line from the player
+ void DispatchMessage(Player &, const std::string &);
+
+ /// send message to all connected clients
+ void DistributeMessage(std::uint8_t type, std::uint32_t ref, const std::string &msg);
+
private:
void HandlePacket(const UDPpacket &);
ClientConnection &GetClient(const IPaddress &);
+ void SendAll();
+
private:
UDPsocket serv_sock;
UDPpacket serv_pack;
const WorldSave &save;
const Model *player_model;
+ CLI cli;
+
};
}