Electroneum
epee::net_utils::jsonrpc2 Namespace Reference

Classes

struct  i_jsonrpc2_server_handler
 
class  jsonrpc2_connection_handler
 
struct  jsonrpc2_server_config
 

Functions

std::string & make_error_resp_json (int64_t code, const std::string &message, std::string &response_data, const epee::serialization::storage_entry &id=nullptr)
 

Function Documentation

◆ make_error_resp_json()

std::string& epee::net_utils::jsonrpc2::make_error_resp_json ( int64_t  code,
const std::string &  message,
std::string &  response_data,
const epee::serialization::storage_entry id = nullptr 
)
inline

Definition at line 19 of file jsonrpc_protocol_handler.h.

22  {
24  rsp.id = id;
25  rsp.jsonrpc = "2.0";
26  rsp.error.code = code;
27  rsp.error.message = message;
28  epee::serialization::store_t_to_json(static_cast<epee::json_rpc::error_response&>(rsp), response_data, 0, false);
29  response_data += "\n";
30  return response_data;
31  }
bool store_t_to_json(t_struct &str_in, std::string &json_buff, size_t indent=0, bool insert_newlines=true)
epee::serialization::storage_entry id
std::string message("Message requiring signing")
Here is the call graph for this function: