X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fserver%2FServer.hpp;h=40905c8ff7943b1fb4824a6b9830d436c2a8dbc0;hb=e2355b50a0d31f675e16593299256334c2baa2c4;hp=3bffafc29d2ada80307be32b5cab2269c49a6a65;hpb=10a310869c61cc52046e165f36ac9639fe9d0c69;p=blank.git diff --git a/src/server/Server.hpp b/src/server/Server.hpp index 3bffafc..40905c8 100644 --- a/src/server/Server.hpp +++ b/src/server/Server.hpp @@ -29,6 +29,10 @@ public: Server(const Config::Network &, World &, const World::Config &, const WorldSave &); ~Server(); + // wait for data to arrive for at most dt milliseconds + void Wait(int dt) noexcept; + // true if there's data waiting to be handled + bool Ready() noexcept; void Handle(); void Update(int dt); @@ -63,6 +67,7 @@ private: private: UDPsocket serv_sock; UDPpacket serv_pack; + SDLNet_SocketSet serv_set; std::list clients; World &world;