From 61847f3443d723eda713e3b6a4425efea24e5f40 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 7 Nov 2017 22:17:15 +0100 Subject: [PATCH] Made Request::remote_endpoint public --- server_http.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server_http.hpp b/server_http.hpp index 97ee7de..d0c60b0 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -183,10 +183,9 @@ namespace SimpleWeb { friend class Session; asio::streambuf streambuf; - std::shared_ptr remote_endpoint; Request(std::size_t max_request_streambuf_size, std::shared_ptr remote_endpoint) noexcept - : streambuf(max_request_streambuf_size), remote_endpoint(std::move(remote_endpoint)), content(streambuf) {} + : streambuf(max_request_streambuf_size), content(streambuf), remote_endpoint(std::move(remote_endpoint)) {} public: std::string method, path, query_string, http_version; @@ -197,6 +196,8 @@ namespace SimpleWeb { regex::smatch path_match; + std::shared_ptr remote_endpoint; + std::string remote_endpoint_address() noexcept { try { return remote_endpoint->address().to_string();