#ifndef MESSAGE_SENDER_H_INCLUDED #define MESSAGE_SENDER_H_INCLUDED #include "UserInfo.h" struct TSignalSender : public boost::enable_shared_from_this { boost::asio::ip::tcp::socket& Socket; int MessageType; TSignalSender(boost::asio::ip::tcp::socket& socket, int messageType); void Send(); void Handle(const boost::system::error_code& error); }; struct TMessageSender : public boost::enable_shared_from_this { boost::asio::ip::tcp::socket& Socket; int MessageType; int MessageDataSize; std::vector MessageData; TMessageSender(boost::asio::ip::tcp::socket& socket, int messageType, std::vector messageData); void Send(); void Handle(const boost::system::error_code& error); }; std::vector CreateMessage(const TUserInfo& userInfo, std::string message); void DecodeMessage(std::vector msgData, TUserInfo& userInfo, std::string& message); std::vector CreateKickPlayerSignal(std::string lastName, std::string firstName, std::string middleName); void DecodeKickPlayerSignal(std::vector msgData, std::string& lastName, std::string& firstName, std::string& middleName); std::vector CreateProfileUpdateQuery(const TUserInfo& userInfo); void DecodeProfileUpdateQuery(std::vector& msgData, TUserInfo& userInfo); std::vector CreateHeartBeatQuery(const TUserInfo& userInfo); void DecodeHeartBeatQuery(std::vector& msgData, TUserInfo& userInfo); void DecodeMapUpdateResponce(std::vector msgData, std::vector& userInfoArr); void DecodeAlarmMapUpdateResponce(std::vector msgData, std::vector& userInfoArr); #endif