#pragma once #include #include #include #include class Network; struct Packet; enum ConnectionState : unsigned char; class NetworkClient { std::unique_ptr network; std::queue > toSend; std::queue > toReceive; ConnectionState state; 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 ReceivePacket(); void SendPacket(std::shared_ptr packet); void UpdatePacket(); };