diff options
| author | Patrick | 2022-01-12 20:56:10 +0100 |
|---|---|---|
| committer | Patrick | 2022-01-12 20:56:10 +0100 |
| commit | 8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b (patch) | |
| tree | caebfbef362ee689de07c19361fdc05597a97088 /src/ws.h | |
| parent | 4264345d06a81cb561047d0973c44a129db934aa (diff) | |
| download | autorec-8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b.tar.gz autorec-8d3cfb2ed7f4d2a70832526e1a2a68926e8a8d4b.zip | |
Makefile, auto ico
Diffstat (limited to 'src/ws.h')
| -rw-r--r-- | src/ws.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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);
|
