Made Request::remote_endpoint public
This commit is contained in:
parent
f55eb4af65
commit
61847f3443
1 changed files with 3 additions and 2 deletions
|
|
@ -183,10 +183,9 @@ namespace SimpleWeb {
|
||||||
friend class Session;
|
friend class Session;
|
||||||
|
|
||||||
asio::streambuf streambuf;
|
asio::streambuf streambuf;
|
||||||
std::shared_ptr<asio::ip::tcp::endpoint> remote_endpoint;
|
|
||||||
|
|
||||||
Request(std::size_t max_request_streambuf_size, std::shared_ptr<asio::ip::tcp::endpoint> remote_endpoint) noexcept
|
Request(std::size_t max_request_streambuf_size, std::shared_ptr<asio::ip::tcp::endpoint> 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:
|
public:
|
||||||
std::string method, path, query_string, http_version;
|
std::string method, path, query_string, http_version;
|
||||||
|
|
@ -197,6 +196,8 @@ namespace SimpleWeb {
|
||||||
|
|
||||||
regex::smatch path_match;
|
regex::smatch path_match;
|
||||||
|
|
||||||
|
std::shared_ptr<asio::ip::tcp::endpoint> remote_endpoint;
|
||||||
|
|
||||||
std::string remote_endpoint_address() noexcept {
|
std::string remote_endpoint_address() noexcept {
|
||||||
try {
|
try {
|
||||||
return remote_endpoint->address().to_string();
|
return remote_endpoint->address().to_string();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue