68 std::optional<PendingConVarQuery>
Take(
int slot,
int cookie, std::string_view name);
78 std::array<std::vector<PendingConVarQuery>,
MaxPlayers> _slots;
std::function< void(int slot, ClientConVarStatus status, std::string_view name, std::string_view value)> QueryCallback
Bookkeeping for ClientConVars: per-slot, cookie-keyed queries awaiting an answer.
static constexpr double TimeoutSec
size_t Count(int slot) const
void Add(int slot, int cookie, std::string name, ClientConVars::QueryCallback callback, double now)
static constexpr size_t MaxPendingPerSlot
std::optional< PendingConVarQuery > Take(int slot, int cookie, std::string_view name)
void Prune(int slot, double now)
static constexpr uint32_t MaxCookie
bool Full(int slot) const
PendingConVarQuery * Find(int slot, std::string_view name)
static std::string ReadFile(const std::filesystem::path &path)
One outstanding client convar query, identified by the cookie sent to the client.
std::string Name
Convar name the query asked for.
double SentAtSec
Caller-supplied monotonic timestamp of the send.
int Cookie
Cookie sent to the client; matched on the answer.
ClientConVars::QueryCallback Callback
Invoked once, when a matching answer arrives.