MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / StartRPCServer

Function StartRPCServer

src/rpc/core/rpcserver.cpp:317–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317bool StartRPCServer() {
318 LogPrint(BCLog::INFO, "Starting HTTP RPC server\n");
319 if (!InitRPCAuthentication()) {
320 return false;
321 }
322 if (!InitHTTPServer()) {
323 StopRPCServer();
324 return false;
325 }
326
327 RegisterHTTPHandler("/", true, JsonRPCHandler);
328
329 struct event_base* eventBase = EventBase();
330 assert(eventBase);
331 httpRPCTimerInterface = MakeUnique<HTTPRPCTimerInterface>(eventBase);
332 RPCSetTimerInterface(httpRPCTimerInterface.get());
333 StartHTTPServer();
334
335 return true;
336}
337
338void InterruptRPCServer() {
339 LogPrint(BCLog::INFO, "Interrupting HTTP RPC server\n");

Callers 1

AppInitFunction · 0.85

Calls 8

InitRPCAuthenticationFunction · 0.85
InitHTTPServerFunction · 0.85
StopRPCServerFunction · 0.85
RegisterHTTPHandlerFunction · 0.85
EventBaseFunction · 0.85
RPCSetTimerInterfaceFunction · 0.85
StartHTTPServerFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected