From f9b7fa67c55bbf3f7d9d2fe1bb1b9a1bd9265860 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Sat, 27 Nov 2021 15:52:34 +0300 Subject: [PATCH] Start server thread --- src/bitcoinrpc.cpp | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 255b7ca..89fc9b7 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -614,6 +614,16 @@ void StartRPCServer() g_server->setOnConnectionCallback([](ix::HttpRequestPtr request, std::shared_ptr connectionState) -> ix::HttpResponsePtr { + // Build a string for the response + std::stringstream ss; + ss << connectionState->getRemoteIp() + << " " + << request->method + << " " + << request->uri; + + std::cout << ss.str() << std::endl; + ix::WebSocketHttpHeaders headers; if (request->method != "POST") { @@ -669,6 +679,9 @@ void StartRPCServer() return StartShutdown(); } + // Run listening thread + g_server->start(); + // We're listening now vnThreadsRunning[THREAD_RPCLISTENER]++; } -- 1.7.1