From d3c7f4b3fd21b04ea7faab24e95bcc138b6e4bd4 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Sat, 5 Jun 2021 23:54:11 -0700 Subject: [PATCH] WebSocketProtocol: Remove availableRequests from Hello --- docs/partials/introduction.md | 5 +---- src/WebSocketProtocol.cpp | 7 ------- src/WebSocketProtocol.h | 2 -- src/WebSocketServer.cpp | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/docs/partials/introduction.md b/docs/partials/introduction.md index 6534efb0..00e05dda 100644 --- a/docs/partials/introduction.md +++ b/docs/partials/introduction.md @@ -299,7 +299,6 @@ The following message types are the base message types which may be sent to and { "obsWebsocketVersion": string, "rpcVersion": number, - "availableRequests": array, "authentication": object(optional) } ``` @@ -312,7 +311,6 @@ Authentication is required "messageType": "Hello", "websocketVersion": "5.0.0", "rpcVersion": 1, - "availableRequests": ["GetVersion"], "authentication": { "challenge": "+IxH4CnCiqpX1rM9scsNynZzbOe4KhDeYcTNS3PDaeY=", "salt": "lM1GncleQOaCu9lT1yeUZhFYnqhsLLP1G5lAGo3ixaI=" @@ -325,8 +323,7 @@ Authentication is not required { "messageType": "Hello", "websocketVersion": "5.0.0", - "rpcVersion": 1, - "availableRequests": ["GetVersion"] + "rpcVersion": 1 } ``` diff --git a/src/WebSocketProtocol.cpp b/src/WebSocketProtocol.cpp index f89aed1f..145e0a38 100644 --- a/src/WebSocketProtocol.cpp +++ b/src/WebSocketProtocol.cpp @@ -235,10 +235,3 @@ WebSocketProtocol::ProcessResult WebSocketProtocol::ProcessMessage(SessionPtr se return ret; } - -std::vector WebSocketProtocol::GetRequestList() -{ - RequestHandler requestHandler; - - return requestHandler.GetRequestList(); -} diff --git a/src/WebSocketProtocol.h b/src/WebSocketProtocol.h index 9a2e3e91..768e543e 100644 --- a/src/WebSocketProtocol.h +++ b/src/WebSocketProtocol.h @@ -19,6 +19,4 @@ namespace WebSocketProtocol { }; ProcessResult ProcessMessage(SessionPtr session, json incomingMessage); - - std::vector GetRequestList(); } diff --git a/src/WebSocketServer.cpp b/src/WebSocketServer.cpp index 294d74ac..cf3a2718 100644 --- a/src/WebSocketServer.cpp +++ b/src/WebSocketServer.cpp @@ -273,7 +273,6 @@ void WebSocketServer::onOpen(websocketpp::connection_hdl hdl) helloMessage["messageType"] = "Hello"; helloMessage["obsWebSocketVersion"] = OBS_WEBSOCKET_VERSION; helloMessage["rpcVersion"] = OBS_WEBSOCKET_RPC_VERSION; - helloMessage["availableRequests"] = WebSocketProtocol::GetRequestList(); if (AuthenticationRequired) { session->SetSecret(AuthenticationSecret); std::string sessionChallenge = Utils::Crypto::GenerateSalt();