mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-01-10 23:55:16 -08:00
Switch from epee http server to boost::beast http server. Min boost 1.70 (#136)
There is roughly a 7.4% increase in performance in the switch to boost::beast. Additionally, the REST endpoints `/daemon_status`, `/get_unspent_outs`, and `/submit_raw_tx` do not block in ZMQ calls, allowing for better response times regardless of `monerod` status. The REST endpoints `/login and `/get_random_outs` still need updates to prevent blocking (`/login` is conditional on DB state).
This commit is contained in:
committed by
Lee *!* Clagett
parent
8080159fc8
commit
075dc5d7c2
@@ -28,6 +28,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <string>
|
||||
@@ -43,9 +44,15 @@ namespace lws
|
||||
class rest_server
|
||||
{
|
||||
struct internal;
|
||||
template<typename> struct connection;
|
||||
template<typename> struct handler_loop;
|
||||
template<typename> struct accept_loop;
|
||||
|
||||
boost::asio::io_service io_service_;
|
||||
boost::asio::io_service io_service_; //!< Put first so its destroyed last
|
||||
std::list<internal> ports_;
|
||||
std::vector<boost::thread> workers_;
|
||||
|
||||
void run_io();
|
||||
|
||||
public:
|
||||
struct configuration
|
||||
|
||||
Reference in New Issue
Block a user