From 1314f09c4d3932f4a8b798cc35c4e20d4801caaa Mon Sep 17 00:00:00 2001 From: milek7 Date: Fri, 18 Jan 2019 00:36:41 +0100 Subject: [PATCH] work --- appveyor.yml | 2 +- network/backend/asio.h | 2 +- network/network.h | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 86a60c8d..3c0a5534 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,7 +5,7 @@ build_script: - ps: >- cd ref - git clone https://github.com/chriskohlhoff/asio --depth 1 + git clone "https://github.com/chriskohlhoff/asio" --depth 1 -q cd .. diff --git a/network/backend/asio.h b/network/backend/asio.h index 58cdb3ea..bbe0858e 100644 --- a/network/backend/asio.h +++ b/network/backend/asio.h @@ -19,9 +19,9 @@ namespace network::tcp virtual void send_data(std::shared_ptr buffer) override; virtual void send_message(const message &msg) override; - private: asio::ip::tcp::socket m_socket; + private: std::string m_header_buffer; std::string m_body_buffer; diff --git a/network/network.h b/network/network.h index 4d447fcb..a9e12029 100644 --- a/network/network.h +++ b/network/network.h @@ -11,9 +11,6 @@ namespace network { class connection { - friend class server; - friend class client; - private: /* std::queue< @@ -29,9 +26,10 @@ namespace network bool is_client; protected: - std::function message_handler; public: + std::function message_handler; + virtual void connected() = 0; virtual void send_message(const message &msg) = 0;