mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
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.
19 lines
439 B
C++
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);
|
|
}
|