41 unsigned int cm[1000];
43 auto& session = connection.
session();
48 for (
int i = 0; i < 1000; ++i) {
51 session.set(
"sessiontest" + to_string(i), cm[i]);
56 if (session.isSet(
"descending") && any_cast<bool>(session[
"descending"])) {
58 session.set(
"descending",
false);
60 session.set(
"descending",
true);
62 for (
int i = 0; i < 1000; ++i) {
63 int val = desc ? 1000 - i : i;
64 session.set(
"sessioncount" + to_string(i), val);
70 for (
int i = 0; i < 1000; ++i) {
71 if (any_cast<unsigned int>(session[
"sessiontest" + to_string(i)]) == cm[i]) {
75 connection.
responseStream() <<
"Match count for sessiontest vars: " << matchcount <<
"\n";
79 for (
int i = 0; i < 1000; ++i) {
80 auto val = any_cast<int>(session[
"sessioncount" + to_string(i)]);
81 if (val != i && val != 1000 - i) {
85 connection.
responseStream() <<
"Fail count for sessioncount vars: " << failcount <<
"\n";
This file will be configured by CMake and contains the necessary properties to ensure that a loaded a...
nawa::Session & session() noexcept
std::ostream & responseStream() noexcept
std::string start(std::string sessionId, std::optional< unsigned long > keepalive=std::nullopt)
int handleRequest(Connection &connection)
int init(AppInit &appInit)