mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-28 17:40:25 +00:00
Fix handling of HTTP/S keep-alives (RIPD-556):
* Proper shutdown for ssl and non-ssl connections * Report session id in history * Report histogram of requests per session * Change print name to 'http' * Split logging into "HTTP" and "HTTP-RPC" partitions * More logging and refinement of logging severities * Log the request count when a session is destroyed Conflicts: src/ripple/http/impl/Peer.cpp src/ripple/http/impl/Peer.h src/ripple/http/impl/ServerImpl.cpp src/ripple/module/app/main/Application.cpp src/ripple/module/app/main/RPCHTTPServer.cpp
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <beast/module/asio/basics/SharedArg.h>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <condition_variable>
|
||||
#include <deque>
|
||||
@@ -43,6 +44,7 @@ class Peer;
|
||||
|
||||
struct Stat
|
||||
{
|
||||
std::size_t id;
|
||||
std::string when;
|
||||
std::chrono::seconds elapsed;
|
||||
int requests;
|
||||
@@ -88,6 +90,8 @@ private:
|
||||
State state_;
|
||||
Doors m_doors;
|
||||
std::deque <Stat> stats_;
|
||||
std::array <std::size_t, 64> hist_;
|
||||
int high_ = 0;
|
||||
|
||||
public:
|
||||
ServerImpl (Server& server, Handler& handler, beast::Journal journal);
|
||||
@@ -136,6 +140,10 @@ public:
|
||||
onWrite (beast::PropertyStream::Map& map);
|
||||
|
||||
private:
|
||||
static
|
||||
int
|
||||
ceil_log2 (unsigned long long x);
|
||||
|
||||
static
|
||||
int
|
||||
compare (Port const& lhs, Port const& rhs);
|
||||
|
||||
Reference in New Issue
Block a user