网页升级

This commit is contained in:
2026-08-11 06:21:51 +08:00
parent f50e9f7c1e
commit feb7c72e94
40 changed files with 6490 additions and 98 deletions
@@ -50,9 +50,12 @@ void Renderive_WebSocket_Controller::handleNewMessage(
return;
}
try {
if (auto pixels = session->handle(*event)) {
connection->send(pixels->data(), pixels->size(),
drogon::WebSocketMessageType::Binary);
if (auto response = session->handle(*event)) {
const auto message_type = response->type == Web_Response_Type::Pixels
? drogon::WebSocketMessageType::Binary
: drogon::WebSocketMessageType::Text;
connection->send(response->payload.data(), response->payload.size(),
message_type);
}
} catch (const std::exception& error) {
LOG_ERROR << "Renderive WebSocket session failed: " << error.what();