Initial Commit
This commit is contained in:
commit
6088fc29ed
978 changed files with 353647 additions and 0 deletions
20
src/Server/MainServer.hpp
Normal file
20
src/Server/MainServer.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
#include <Helpers/Networking/NetServer.hpp>
|
||||
#include <chrono>
|
||||
#include "ClientData.hpp"
|
||||
#include "Helpers/Networking/NetLibrary.hpp"
|
||||
#include "ServerData.hpp"
|
||||
|
||||
class MainServer {
|
||||
public:
|
||||
MainServer(World& initWorld, const std::string& serverLocalID);
|
||||
void update();
|
||||
~MainServer();
|
||||
std::shared_ptr<NetServer> netServer;
|
||||
std::unordered_map<ServerPortionID, ClientData> clients;
|
||||
private:
|
||||
World& world;
|
||||
void ensure_display_name_unique(std::string& displayName);
|
||||
ServerData data;
|
||||
std::chrono::steady_clock::time_point lastKeepAliveSent;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue