]> git.localhorst.tv Git - blank.git/blobdiff - src/net/Server.hpp
move server and client stuff around
[blank.git] / src / net / Server.hpp
diff --git a/src/net/Server.hpp b/src/net/Server.hpp
deleted file mode 100644 (file)
index a6d509b..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef BLANK_NET_SERVER_HPP
-#define BLANK_NET_SERVER_HPP
-
-#include <list>
-#include <SDL_net.h>
-
-
-namespace blank {
-
-class ClientConnection;
-class World;
-
-class Server {
-
-public:
-       struct Config {
-               Uint16 port = 12354;
-       };
-
-public:
-       Server(const Config &, World &);
-       ~Server();
-
-       void Handle();
-
-       void Update(int dt);
-
-       UDPsocket &GetSocket() noexcept { return serv_sock; }
-       UDPpacket &GetPacket() noexcept { return serv_pack; }
-
-       World &GetWorld() noexcept { return world; }
-
-private:
-       void HandlePacket(const UDPpacket &);
-
-       ClientConnection &GetClient(const IPaddress &);
-
-private:
-       UDPsocket serv_sock;
-       UDPpacket serv_pack;
-       std::list<ClientConnection> clients;
-
-       World &world;
-
-};
-
-}
-
-#endif