This commit is contained in:
milek7
2019-01-18 00:36:41 +01:00
parent f63bd04bfe
commit 1314f09c4d
3 changed files with 4 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ build_script:
- ps: >- - ps: >-
cd ref cd ref
git clone https://github.com/chriskohlhoff/asio --depth 1 git clone "https://github.com/chriskohlhoff/asio" --depth 1 -q
cd .. cd ..

View File

@@ -19,9 +19,9 @@ namespace network::tcp
virtual void send_data(std::shared_ptr<std::string> buffer) override; virtual void send_data(std::shared_ptr<std::string> buffer) override;
virtual void send_message(const message &msg) override; virtual void send_message(const message &msg) override;
private:
asio::ip::tcp::socket m_socket; asio::ip::tcp::socket m_socket;
private:
std::string m_header_buffer; std::string m_header_buffer;
std::string m_body_buffer; std::string m_body_buffer;

View File

@@ -11,9 +11,6 @@ namespace network
{ {
class connection class connection
{ {
friend class server;
friend class client;
private: private:
/* /*
std::queue< std::queue<
@@ -29,9 +26,10 @@ namespace network
bool is_client; bool is_client;
protected: protected:
std::function<void(const message &msg)> message_handler;
public: public:
std::function<void(const message &msg)> message_handler;
virtual void connected() = 0; virtual void connected() = 0;
virtual void send_message(const message &msg) = 0; virtual void send_message(const message &msg) = 0;