From e0b7f23cd967db7e713b9de960cad9bceb9fece8 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 13 Jan 2018 14:31:24 +0500 Subject: New implementation of NC is using event-system --- src/NetworkClient.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/NetworkClient.hpp') diff --git a/src/NetworkClient.hpp b/src/NetworkClient.hpp index 2bcbd9f..f372468 100644 --- a/src/NetworkClient.hpp +++ b/src/NetworkClient.hpp @@ -4,6 +4,7 @@ #include #include #include +#include class Network; struct Packet; @@ -16,12 +17,10 @@ class NetworkClient { ConnectionState state; int compressionThreshold = -1; std::chrono::steady_clock::time_point timeOfLastKeepAlivePacket; + std::thread thread; + bool isRunning=true; + void ExecNs(); public: NetworkClient(std::string address, unsigned short port, std::string username); ~NetworkClient(); - - std::shared_ptr ReceivePacket(); - void SendPacket(std::shared_ptr packet); - - void UpdatePacket(); }; \ No newline at end of file -- cgit v1.2.3