#pragma once #include #include #include #include "Network.hpp" class NetworkClient { Network network; std::thread networkThread; std::mutex toSendMutex; std::mutex toReceiveMutex; std::queue > toSend; std::queue > toReceive; bool isActive=true; bool &isRunning; ConnectionState state; void NetworkLoop(); public: NetworkClient(std::string address, unsigned short port, std::string username, bool &quit); ~NetworkClient(); std::shared_ptr ReceivePacket(); void SendPacket(std::shared_ptr packet); };