Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Created by armegon on 17.09.20 г..
- //
- #ifndef VIBRANIUM_CORE_PACKET_H
- #define VIBRANIUM_CORE_PACKET_H
- #include <cstdio>
- #include <cstdlib>
- #include <cstring>
- #include "string"
- #include "Protocol/ServerOpcode.h"
- class Packet {
- public:
- Packet() : body_length_(0)
- {
- }
- enum { body_length = 1024 };
- enum { header_length = 8 };
- char header_[header_length];
- char body_[body_length];
- char data_[header_length + body_length];
- void PreparePacket(ServerOpcode serverOpcode, std::string message);
- private:
- void decode_header();
- size_t body_length_;
- };
- #endif //VIBRANIUM_CORE_PACKET_H
Advertisement
Add Comment
Please, Sign In to add comment