From 71760514fc044f273914c17b1510fa3cf10419b3 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Fri, 21 Apr 2017 18:31:43 +0500 Subject: 2017-04-21 --- NetworkClient.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'NetworkClient.hpp') diff --git a/NetworkClient.hpp b/NetworkClient.hpp index df2f616..a41b5f4 100644 --- a/NetworkClient.hpp +++ b/NetworkClient.hpp @@ -1,6 +1,8 @@ #pragma once #include +#include +#include #include "Network.hpp" struct ServerInfo{ @@ -21,11 +23,16 @@ public: void Update(); - Packet GetPacket(); + void MainLoop(); + + Packet * GetPacket(); void AddPacketToQueue(Packet packet); static ServerInfo ServerPing(std::string address,unsigned short port); private: + std::mutex m_updateMutex; + std::thread m_networkThread; + bool isContinue=true; NetworkClient (const NetworkClient&); NetworkClient&operator=(const NetworkClient&); Network m_network; -- cgit v1.2.3