summaryrefslogtreecommitdiffstats
path: root/src/NetworkClient.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/NetworkClient.hpp')
-rw-r--r--src/NetworkClient.hpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/NetworkClient.hpp b/src/NetworkClient.hpp
index acb3ecb..a26c262 100644
--- a/src/NetworkClient.hpp
+++ b/src/NetworkClient.hpp
@@ -9,19 +9,17 @@
class NetworkClient {
Network network;
- std::thread networkThread;
- std::mutex toSendMutex;
- std::mutex toReceiveMutex;
std::queue <std::shared_ptr<Packet>> toSend;
std::queue <std::shared_ptr<Packet>> toReceive;
- bool isActive=true;
ConnectionState state;
- void NetworkLoop();
int compressionThreshold = -1;
+ std::chrono::steady_clock::time_point timeOfLastKeepAlivePacket;
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