Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,236 Lines • ▼ Show 20 Lines | |||||
static bool AppInitServers(Config &config, | static bool AppInitServers(Config &config, | ||||
HTTPRPCRequestProcessor &httpRPCRequestProcessor) { | HTTPRPCRequestProcessor &httpRPCRequestProcessor) { | ||||
RPCServerSignals::OnStarted(&OnRPCStarted); | RPCServerSignals::OnStarted(&OnRPCStarted); | ||||
RPCServerSignals::OnStopped(&OnRPCStopped); | RPCServerSignals::OnStopped(&OnRPCStopped); | ||||
if (!InitHTTPServer(config)) { | if (!InitHTTPServer(config)) { | ||||
return false; | return false; | ||||
} | } | ||||
if (!StartRPC()) { | |||||
return false; | StartRPC(); | ||||
} | |||||
if (!StartHTTPRPC(config, httpRPCRequestProcessor)) { | if (!StartHTTPRPC(config, httpRPCRequestProcessor)) { | ||||
return false; | return false; | ||||
} | } | ||||
if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST()) { | if (gArgs.GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST()) { | ||||
return false; | return false; | ||||
} | } | ||||
if (!StartHTTPServer()) { | |||||
return false; | StartHTTPServer(); | ||||
} | |||||
return true; | return true; | ||||
} | } | ||||
// Parameter interaction based on rules | // Parameter interaction based on rules | ||||
void InitParameterInteraction() { | void InitParameterInteraction() { | ||||
// when specifying an explicit binding address, you want to listen on it | // when specifying an explicit binding address, you want to listen on it | ||||
// even when -connect or -proxy is specified. | // even when -connect or -proxy is specified. | ||||
if (gArgs.IsArgSet("-bind")) { | if (gArgs.IsArgSet("-bind")) { | ||||
▲ Show 20 Lines • Show All 1,248 Lines • Show Last 20 Lines |