]> git.localhorst.tv Git - blank.git/blobdiff - src/net/Client.hpp
move server and client stuff around
[blank.git] / src / net / Client.hpp
diff --git a/src/net/Client.hpp b/src/net/Client.hpp
deleted file mode 100644 (file)
index 2848aed..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef BLANK_NET_CLIENT_HPP_
-#define BLANK_NET_CLIENT_HPP_
-
-#include "Connection.hpp"
-
-#include <string>
-#include <SDL_net.h>
-
-
-namespace blank {
-
-class World;
-
-class Client {
-
-public:
-       struct Config {
-               std::string host = "localhost";
-               Uint16 port = 12354;
-       };
-
-public:
-       explicit Client(const Config &);
-       ~Client();
-
-       void Handle();
-
-       void Update(int dt);
-
-       Connection &GetConnection() noexcept { return conn; }
-       const Connection &GetConnection() const noexcept { return conn; }
-
-       std::uint16_t SendPing();
-       std::uint16_t SendLogin(const std::string &);
-       std::uint16_t SendPart();
-       std::uint16_t SendPlayerUpdate(const Entity &);
-
-private:
-       void HandlePacket(const UDPpacket &);
-
-private:
-       Connection conn;
-       UDPsocket client_sock;
-       UDPpacket client_pack;
-
-};
-
-}
-
-#endif