]> git.localhorst.tv Git - blank.git/blobdiff - src/net/Client.hpp
transmit chunks from server to client
[blank.git] / src / net / Client.hpp
index 63c3fdd5e9f7d1aa7ae020fe4d22ef19b0031ce4..2848aedb342a37ebcac5ebd8c7052089c0696397 100644 (file)
@@ -20,20 +20,25 @@ public:
        };
 
 public:
-       Client(const Config &, World &);
+       explicit Client(const Config &);
        ~Client();
 
        void Handle();
 
        void Update(int dt);
 
-       bool TimedOut() { return conn.TimedOut(); }
+       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:
-       World &world;
        Connection conn;
        UDPsocket client_sock;
        UDPpacket client_pack;