| 256 | } |
| 257 | |
| 258 | void sendLog(const std::string& log) { |
| 259 | rapidjson::StringBuffer buf; |
| 260 | rapidjson::Writer<rapidjson::StringBuffer> writer(buf); |
| 261 | writer.StartObject(); |
| 262 | writer.Key("name"); |
| 263 | writer.String("Log"); |
| 264 | writer.Key("text"); |
| 265 | writer.String(log.c_str(), log.size()); |
| 266 | writer.EndObject(); |
| 267 | Event::send("AppWS"sv, makeAppWSMessage("Send"_slice, std::string{buf.GetString(), buf.GetLength()})); |
| 268 | } |
| 269 | |
| 270 | bool start(int port) { |
| 271 | try { |
nothing calls this directly
no test coverage detected