Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <chainparamsbase.h>
#include <clientversion.h>
#include <fs.h>
#include <rpc/client.h>
#include <rpc/protocol.h>
#include <stacktraces.h>
#include <util.h>
#include <utilstrencodings.h>
#include <memory>
#include <stdio.h>
#include <event2/buffer.h>
#include <event2/keyvalq_struct.h>
#include <support/events.h>
#include <univalue.h>
Go to the source code of this file.
Classes | |
class | CConnectionFailed |
struct | HTTPReply |
Reply structure for request_done to fill in. More... | |
class | BaseRequestHandler |
Class that handles the conversion from a command-line to a JSON-RPC request, as well as converting back to a JSON object that can be shown as result. More... | |
class | GetinfoRequestHandler |
Process getinfo requests. More... | |
class | DefaultRequestHandler |
Process default single requests. More... | |
Functions | |
std::string | HelpMessageCli () |
static int | AppInitRPC (int argc, char *argv[]) |
const char * | http_errorstring (int code) |
static void | http_request_done (struct evhttp_request *req, void *ctx) |
static UniValue | CallRPC (BaseRequestHandler *rh, const std::string &strMethod, const std::vector< std::string > &args) |
int | CommandLineRPC (int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
Variables | |
static const char | DEFAULT_RPCCONNECT [] = "127.0.0.1" |
static const int | DEFAULT_HTTP_CLIENT_TIMEOUT =900 |
static const bool | DEFAULT_NAMED =false |
static const int | CONTINUE_EXECUTION =-1 |
Function Documentation
◆ AppInitRPC()
|
static |
Definition at line 82 of file dash-cli.cpp.
References _(), BITCOIN_CONF_FILENAME, CONTINUE_EXECUTION, FormatFullVersion(), gArgs, ArgsManager::GetArg(), ArgsManager::GetBoolArg(), ArgsManager::GetChainName(), GetCrashInfoStrFromSerializedStr(), GetDataDir(), HelpMessageCli(), ArgsManager::IsArgSet(), ArgsManager::ParseParameters(), ArgsManager::ReadConfigFile(), SelectBaseParams(), and strprintf.
Referenced by main().
◆ CallRPC()
|
static |
Definition at line 302 of file dash-cli.cpp.
References _(), BaseParams(), BITCOIN_CONF_FILENAME, DEFAULT_HTTP_CLIENT_TIMEOUT, DEFAULT_RPCCONNECT, UniValue::empty(), EncodeBase64(), gArgs, ArgsManager::GetArg(), ArgsManager::GetArgs(), GetAuthCookie(), GetConfigFile(), HTTP_BAD_REQUEST, http_errorstring(), HTTP_INTERNAL_SERVER_ERROR, HTTP_NOT_FOUND, http_request_done(), HTTP_UNAUTHORIZED, obtain_event_base(), obtain_evhttp_connection_base(), obtain_evhttp_request(), BaseRequestHandler::PrepareRequest(), BaseRequestHandler::ProcessReply(), UniValue::read(), CBaseChainParams::RPCPort(), SplitHostPort(), strprintf, strRPCUserColonPass, UniValue::VSTR, and UniValue::write().
Referenced by CommandLineRPC().
◆ CommandLineRPC()
int CommandLineRPC | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 395 of file dash-cli.cpp.
References CallRPC(), error(), find_value(), ArgsManager::ForceSetArg(), gArgs, UniValue::get_int(), UniValue::get_str(), ArgsManager::GetBoolArg(), UniValue::getValStr(), UniValue::isNull(), UniValue::isNum(), UniValue::isStr(), IsSwitchChar(), MilliSleep(), PrintExceptionContinue(), RPC_IN_WARMUP, and RPC_WALLET_NOT_SPECIFIED.
Referenced by main().
◆ HelpMessageCli()
std::string HelpMessageCli | ( | ) |
Definition at line 34 of file dash-cli.cpp.
References _(), AppendParamsHelpMessages(), BITCOIN_CONF_FILENAME, CreateBaseChainParams(), DEFAULT_HTTP_CLIENT_TIMEOUT, DEFAULT_NAMED, DEFAULT_RPCCONNECT, HelpMessageGroup(), HelpMessageOpt(), CBaseChainParams::MAIN, strprintf, and CBaseChainParams::TESTNET.
Referenced by AppInitRPC().
◆ http_errorstring()
const char* http_errorstring | ( | int | code | ) |
Definition at line 154 of file dash-cli.cpp.
Referenced by CallRPC().
◆ http_request_done()
|
static |
Definition at line 176 of file dash-cli.cpp.
References HTTPReply::body, ctx, and HTTPReply::status.
Referenced by CallRPC().
◆ main()
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 502 of file dash-cli.cpp.
References AppInitRPC(), CommandLineRPC(), CONTINUE_EXECUTION, PrintExceptionContinue(), RegisterPrettySignalHandlers(), RegisterPrettyTerminateHander(), SetupEnvironment(), and SetupNetworking().
Variable Documentation
◆ CONTINUE_EXECUTION
|
static |
Definition at line 32 of file dash-cli.cpp.
Referenced by AppInitRPC(), and main().
◆ DEFAULT_HTTP_CLIENT_TIMEOUT
|
static |
Definition at line 30 of file dash-cli.cpp.
Referenced by CallRPC(), and HelpMessageCli().
◆ DEFAULT_NAMED
|
static |
Definition at line 31 of file dash-cli.cpp.
Referenced by HelpMessageCli(), and DefaultRequestHandler::PrepareRequest().
◆ DEFAULT_RPCCONNECT
|
static |
Definition at line 29 of file dash-cli.cpp.
Referenced by CallRPC(), and HelpMessageCli().