diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 10:31:24 +0100 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 10:57:41 +0100 |
commit | e0b7f23cd967db7e713b9de960cad9bceb9fece8 (patch) | |
tree | 4c97ce06d0f1b34f6678fa69d2988b29d4a606ee /src/NetworkClient.hpp | |
parent | Finally removed all SFML references (diff) | |
download | AltCraft-e0b7f23cd967db7e713b9de960cad9bceb9fece8.tar AltCraft-e0b7f23cd967db7e713b9de960cad9bceb9fece8.tar.gz AltCraft-e0b7f23cd967db7e713b9de960cad9bceb9fece8.tar.bz2 AltCraft-e0b7f23cd967db7e713b9de960cad9bceb9fece8.tar.lz AltCraft-e0b7f23cd967db7e713b9de960cad9bceb9fece8.tar.xz AltCraft-e0b7f23cd967db7e713b9de960cad9bceb9fece8.tar.zst AltCraft-e0b7f23cd967db7e713b9de960cad9bceb9fece8.zip |
Diffstat (limited to 'src/NetworkClient.hpp')
-rw-r--r-- | src/NetworkClient.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
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 <queue> #include <string> #include <chrono> +#include <thread> 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 <Packet> ReceivePacket(); - void SendPacket(std::shared_ptr<Packet> packet); - - void UpdatePacket(); };
\ No newline at end of file |