MCPcopy Create free account
hub / github.com/cinemast/libjson-rpc-cpp / ProcessRequest

Method ProcessRequest

src/jsonrpccpp/server/abstractprotocolhandler.cpp:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void AbstractProtocolHandler::ProcessRequest(const Json::Value &request, Json::Value &response) {
42 Procedure &method = this->procedures[request[KEY_REQUEST_METHODNAME].asString()];
43 Json::Value result;
44
45 if (method.GetProcedureType() == RPC_METHOD) {
46 handler.HandleMethodCall(method, request[KEY_REQUEST_PARAMETERS], result);
47 this->WrapResult(request, response, result);
48 } else {
49 handler.HandleNotificationCall(method, request[KEY_REQUEST_PARAMETERS]);
50 response = Json::nullValue;
51 }
52}
53
54int AbstractProtocolHandler::ValidateRequest(const Json::Value &request) {
55 int error = 0;

Callers 9

SetRequestMethod · 0.45
HandleJsonRequestMethod · 0.45
HandleSingleRequestMethod · 0.45
GenerateResponseMethod · 0.45
HandleConnectionMethod · 0.45
HandleConnectionMethod · 0.45
HandleConnectionMethod · 0.45
ListenLoopMethod · 0.45
HandleConnectionMethod · 0.45

Calls 4

GetProcedureTypeMethod · 0.80
HandleMethodCallMethod · 0.80
WrapResultMethod · 0.45

Tested by 1

SetRequestMethod · 0.36