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

Method WrapResult

src/jsonrpccpp/server/rpcprotocolserverv1.cpp:47–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void RpcProtocolServerV1::WrapResult(const Json::Value &request, Json::Value &response, Json::Value &retValue) {
48 response[KEY_RESPONSE_RESULT] = retValue;
49 response[KEY_RESPONSE_ERROR] = Json::nullValue;
50 response[KEY_REQUEST_ID] = request[KEY_REQUEST_ID];
51}
52
53void RpcProtocolServerV1::WrapError(const Json::Value &request, int code, const std::string &message, Json::Value &result) {
54 result["error"]["code"] = code;

Callers 1

ProcessRequestMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected