MCPcopy Create free account
hub / github.com/LUX-Core/lux / StartHTTPServer

Function StartHTTPServer

src/httpserver.cpp:428–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426static std::vector<std::thread> g_thread_http_workers;
427
428bool StartHTTPServer()
429{
430 LogPrint("http", "Starting HTTP server\n");
431 int rpcThreads = std::max((long)GetArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1L);
432 LogPrintf("HTTP: starting %d worker threads\n", rpcThreads);
433 std::packaged_task<bool(event_base*)> task(ThreadHTTP);
434 threadResult = task.get_future();
435 threadHTTP = std::thread(std::move(task), eventBase);
436
437 for (int i = 0; i < rpcThreads; i++) {
438 g_thread_http_workers.emplace_back(HTTPWorkQueueRun, workQueue);
439 }
440 return true;
441}
442
443void InterruptHTTPServer()
444{

Callers 1

AppInitServersFunction · 0.85

Calls 3

LogPrintFunction · 0.85
maxFunction · 0.85
GetArgFunction · 0.85

Tested by

no test coverage detected