Full C++23 framework tree: runtime, observability, security, data, app, realtime, supervisor, clients, CLI, example plus enterprise tenancy, audit, operability, governance, supplychain. Postgres via docker compose for tests.
18 lines
597 B
C++
18 lines
597 B
C++
// Route: /socketio/rooms (socket.io skeleton endpoint)
|
|
#include "support/Assert.hpp"
|
|
|
|
using namespace molo::example::test;
|
|
|
|
int main() {
|
|
Fixture f;
|
|
auto info = f.client->get("/socketio/rooms");
|
|
check(info.status == 200, "status 200");
|
|
check(contains(info.body, "socket.io"), "protocol named");
|
|
check(contains(info.body, "long-polling"), "fallback named");
|
|
auto emit = f.client->post(
|
|
"/socketio/rooms", "{\"room\":\"lobby\",\"event\":\"join\"}",
|
|
"application/json");
|
|
check(contains(emit.body, "\"ack\":true"), "emit acknowledged");
|
|
return finish("socketio/rooms");
|
|
}
|