mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Base: Large plugin refactor
- Merge WebSocketProtocol into WebSocketServer - Having them separated was not doing anything productive - Request: Move SessionPtr to RequestHandler - Less copying to do for batch requests - Fully modularize EventHandler - Make BroadcastEvent a stored callback that WebSocketServer sets - Return early on high volume events to avoid unnecessary compute - These events will only generate a json object when it is actually needed
This commit is contained in:
@ -86,6 +86,11 @@ const std::map<std::string, RequestMethodHandler> RequestHandler::_handlerMap
|
||||
{"StopStream", &RequestHandler::StopStream},
|
||||
};
|
||||
|
||||
RequestHandler::RequestHandler(SessionPtr session) :
|
||||
_session(session)
|
||||
{
|
||||
}
|
||||
|
||||
RequestResult RequestHandler::ProcessRequest(const Request& request)
|
||||
{
|
||||
if (!request.RequestData.is_object() && !request.RequestData.is_null())
|
||||
|
Reference in New Issue
Block a user