#pragma once #include #include enum class message { HELLO = 1, NEPTUN = 2, PASSW = 3, SERVER_DIRECTION = 4, MESSAGE = 5, PING = 6, PONG = 7, BYE = 8, LOGIN = 9, LOGOUT = 10 }; class chat_message { message _header; std::string _content; public: chat_message(message header, std::string content = "") :_header(header), _content(content) {} chat_message(std::underlying_type::type header_integral, std::string content) :_header(static_cast(header_integral)), _content(content) {} std::string get() { return std::to_string(static_cast::type>(_header)) + _content; } };