summaryrefslogtreecommitdiffstats
path: root/src/NetworkClient.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 10:31:24 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 10:57:41 +0100
commite0b7f23cd967db7e713b9de960cad9bceb9fece8 (patch)
tree4c97ce06d0f1b34f6678fa69d2988b29d4a606ee /src/NetworkClient.hpp
parentFinally removed all SFML references (diff)
downloadAltCraft-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 '')
-rw-r--r--src/NetworkClient.hpp9
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