]> git.localhorst.tv Git - blank.git/blobdiff - src/net/Packet.hpp
client-side implementation of login packet
[blank.git] / src / net / Packet.hpp
index 7b482e58726ca8215df125a121ff968db696927d..d5479909bac38cbe6085e0e0ce4e95c1849d6c60 100644 (file)
@@ -2,6 +2,7 @@
 #define BLANK_NET_PACKET_HPP_
 
 #include <cstdint>
+#include <string>
 
 
 namespace blank {
@@ -11,7 +12,8 @@ struct Packet {
        static constexpr std::uint32_t TAG = 0xFB1AB1AF;
 
        enum Type {
-               PING,
+               PING = 0,
+               LOGIN = 1,
        };
 
        struct Header {
@@ -25,6 +27,7 @@ struct Packet {
        void Tag() noexcept;
 
        std::size_t Ping() noexcept;
+       std::size_t Login(const std::string &name) noexcept;
 
 };