obs-websocket/src/WebSocketProtocol.h
tt2468 4be9b995fb base: Use shared_ptr instead of explicit ref counts
Took a night of sleep but I realized how I could solve the
concurrency issues in a good way. Uses shared_ptr, where the map
always accounts for one reference to a session.
2021-04-30 08:45:34 -07:00

19 lines
439 B
C++

#pragma once
#include <string>
#include <nlohmann/json.hpp>
#include "WebSocketServer.h"
#include "WebSocketSession.h"
#include "requesthandler/RequestHandler.h"
namespace WebSocketProtocol {
struct ProcessResult {
WebSocketServer::WebSocketCloseCode closeCode = WebSocketServer::WebSocketCloseCode::DontClose;
std::string closeReason;
json result;
};
ProcessResult ProcessMessage(SessionPtr session, json incomingMessage);
}