Begin path recording trials
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class websocket
|
||||
class Websocket
|
||||
{
|
||||
private:
|
||||
char lastPath[513] = "";
|
||||
@@ -30,8 +30,8 @@ private:
|
||||
std::function<void(std::string)> toLog;
|
||||
|
||||
public:
|
||||
explicit websocket(std::function<void(const std::string)> toLog);
|
||||
~websocket();
|
||||
explicit Websocket(std::function<void(const std::string)> toLog);
|
||||
~Websocket();
|
||||
void onClientMessageCallback(
|
||||
std::shared_ptr<ix::ConnectionState> &connectionState,
|
||||
ix::WebSocket &ws,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "include/websocket.h"
|
||||
|
||||
websocket::websocket(std::function<void(const std::string)> toLog)
|
||||
Websocket::Websocket(std::function<void(const std::string)> toLog)
|
||||
: toLog(std::move(toLog))
|
||||
{
|
||||
#ifdef IBM
|
||||
@@ -27,7 +27,7 @@ websocket::websocket(std::function<void(const std::string)> toLog)
|
||||
server->start();
|
||||
}
|
||||
|
||||
websocket::~websocket()
|
||||
Websocket::~Websocket()
|
||||
{
|
||||
server->stop();
|
||||
|
||||
@@ -37,7 +37,7 @@ websocket::~websocket()
|
||||
#endif
|
||||
}
|
||||
|
||||
void websocket::onClientMessageCallback(
|
||||
void Websocket::onClientMessageCallback(
|
||||
std::shared_ptr<ix::ConnectionState> &connectionState,
|
||||
ix::WebSocket &ws,
|
||||
const ix::WebSocketMessagePtr &msg)
|
||||
@@ -95,7 +95,7 @@ void websocket::onClientMessageCallback(
|
||||
}
|
||||
}
|
||||
|
||||
void websocket::sendData(data d)
|
||||
void Websocket::sendData(data d)
|
||||
{
|
||||
if (strcmp(d.path, lastPath) != 0) {
|
||||
strcpy(lastPath, d.path);
|
||||
|
||||
Reference in New Issue
Block a user