treesummaryrefslogcommitdiff
path: root/src/ws.h
diff options
context:
space:
mode:
authorPatrick2022-01-12 20:56:10 +0100
committerPatrick2022-01-12 20:56:10 +0100
commit8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b (patch)
treecaebfbef362ee689de07c19361fdc05597a97088 /src/ws.h
parent4264345d06a81cb561047d0973c44a129db934aa (diff)
downloadautorec-8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b.tar.gz
autorec-8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b.zip
Makefile, auto ico
Diffstat (limited to 'src/ws.h')
-rw-r--r--src/ws.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ws.h b/src/ws.h
index 058f69b..4bebc1f 100644
--- a/src/ws.h
+++ b/src/ws.h
@@ -44,7 +44,7 @@ namespace ws
}
if (ev == MG_EV_ERROR) {
- puts("Error");
+ printf("Error: %s\n", (char*)ev_data);
done = true;
}
if (ev == MG_EV_CLOSE) {
@@ -75,7 +75,7 @@ namespace ws
{ "d",
{
{ "requestType", requestType },
- { "requestId", std::to_string(NULL).c_str() }
+ { "requestId", std::to_string(time(nullptr)).c_str() }
} } };
auto requestStr = request.dump();
mg_ws_send(c, requestStr.c_str(), requestStr.size(), WEBSOCKET_OP_TEXT);