(ws autoroute) Display result in compliant way (AUTOROUTE IXWebSocket :: N ms) so that result can be parsed easily

This commit is contained in:
Benjamin Sergeant
2020-11-07 09:34:47 -08:00
parent 91fb3992ac
commit 262f32857f
6 changed files with 55 additions and 37 deletions

View File

@ -10,10 +10,10 @@
#include <fstream>
#include <iomanip>
#include <iostream>
#include <ixwebsocket/IXNetSystem.h>
#include <ixwebsocket/IXWebSocket.h>
#include <ixcobra/IXCobraMetricsPublisher.h>
#include <ixcrypto/IXUuid.h>
#include <ixwebsocket/IXNetSystem.h>
#include <ixwebsocket/IXWebSocket.h>
#include <mutex>
#include <random>
#include <stack>

View File

@ -7,8 +7,8 @@
#pragma once
#include <iostream>
#include <ixsnake/IXAppConfig.h>
#include <ixcobra/IXCobraConfig.h>
#include <ixsnake/IXAppConfig.h>
#include <ixwebsocket/IXGetFreePort.h>
#include <ixwebsocket/IXSocketTLSOptions.h>
#include <ixwebsocket/IXWebSocketServer.h>

View File

@ -47,7 +47,9 @@ namespace
mutable std::mutex _mutex;
};
WebSocketBroadcastChat::WebSocketBroadcastChat(const std::string& user, const std::string& session, int port)
WebSocketBroadcastChat::WebSocketBroadcastChat(const std::string& user,
const std::string& session,
int port)
: _user(user)
, _session(session)
, _port(port)
@ -156,7 +158,8 @@ namespace
_webSocket.start();
}
std::pair<std::string, std::string> WebSocketBroadcastChat::decodeMessage(const std::string& str)
std::pair<std::string, std::string> WebSocketBroadcastChat::decodeMessage(
const std::string& str)
{
std::string errMsg;
MsgPack msg = MsgPack::parse(str, errMsg);