2016-11-19 16:24:39 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <boost/asio.hpp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class message
|
|
|
|
{
|
2016-11-19 16:40:00 +00:00
|
|
|
protected:
|
|
|
|
virtual std::string get_message_length() = 0;
|
|
|
|
virtual std::string get_message() = 0;
|
2016-11-19 23:18:14 +00:00
|
|
|
virtual void process_data(std::string&) = 0;
|
2016-11-19 16:40:00 +00:00
|
|
|
|
2016-11-19 16:24:39 +00:00
|
|
|
public:
|
2016-11-19 16:40:00 +00:00
|
|
|
|
|
|
|
void send(boost::asio::ip::tcp::socket&);
|
2016-11-19 23:18:14 +00:00
|
|
|
void receive(boost::asio::ip::tcp::socket&);
|
2016-11-19 16:24:39 +00:00
|
|
|
|
|
|
|
virtual ~message();
|
|
|
|
};
|