formatting

This commit is contained in:
Benjamin Sergeant 2020-01-09 13:45:31 -08:00
parent 27287aea50
commit 21f42210a2
2 changed files with 11 additions and 10 deletions

View File

@ -10,12 +10,12 @@
//
#include "nlohmann/json.hpp"
#include <iostream>
#include <ixwebsocket/IXSocket.h>
#include <ixwebsocket/IXWebSocket.h>
#include <queue>
#include <spdlog/spdlog.h>
#include <sstream>
#include <iostream>
// for convenience
using json = nlohmann::json;

View File

@ -258,17 +258,18 @@ namespace ix
MsgPack msg(pdu);
Bench bench("Sending file through websocket");
auto result = _webSocket.sendBinary(msg.dump(), [this, throttle](int current, int total) -> bool {
spdlog::info("ws_send: Step {} out of {}", current + 1, total);
auto result =
_webSocket.sendBinary(msg.dump(), [this, throttle](int current, int total) -> bool {
spdlog::info("ws_send: Step {} out of {}", current + 1, total);
if (throttle)
{
std::chrono::duration<double, std::milli> duration(10);
std::this_thread::sleep_for(duration);
}
if (throttle)
{
std::chrono::duration<double, std::milli> duration(10);
std::this_thread::sleep_for(duration);
}
return _connected;
});
return _connected;
});
if (!result.success)
{