mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
work
This commit is contained in:
@@ -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 ..
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user