#include <session_impl.hpp>
|
using | Body = boost::beast::http::string_body |
|
using | Request = boost::beast::http::request< Body > |
|
using | Response = boost::beast::http::response< Body > |
|
using | Parser = boost::beast::http::request_parser< Body > |
|
using | HttpField = boost::beast::http::field |
|
using | HttpError = boost::beast::http::error |
|
|
static constexpr boost::string_view | kServerName = "Kagome" |
|
|
using | Body = boost::beast::http::string_body |
|
using | Request = boost::beast::http::request< Body > |
|
using | Response = boost::beast::http::response< Body > |
|
using | Context = boost::asio::io_context |
|
using | Socket = boost::asio::ip::tcp::socket |
|
using | ErrorCode = boost::system::error_code |
|
using | Streambuf = boost::asio::streambuf |
|
using | Duration = boost::asio::steady_timer::duration |
|
using | SessionId = uint64_t |
|
Definition at line 18 of file session_impl.hpp.
constructor
- Parameters
-
socket | socket instance |
config | session configuration |
Definition at line 12 of file session_impl.cpp.
kagome::metrics::SessionImpl::~SessionImpl |
( |
| ) |
|
|
overridedefault |
void kagome::metrics::SessionImpl::asyncRead |
( |
| ) |
|
|
private |
void kagome::metrics::SessionImpl::asyncWrite |
( |
Response |
message | ) |
|
|
private |
sends http message
- Template Parameters
-
- Parameters
-
Definition at line 45 of file session_impl.cpp.
void kagome::metrics::SessionImpl::handleRequest |
( |
Request && |
request | ) |
|
|
private |
process http request, compose and execute response
- Template Parameters
-
- Parameters
-
Definition at line 28 of file session_impl.cpp.
SessionId kagome::metrics::SessionImpl::id |
( |
| ) |
const |
|
inlineoverridevirtual |
void kagome::metrics::SessionImpl::onRead |
( |
boost::system::error_code |
ec, |
|
|
std::size_t |
size |
|
) |
| |
|
private |
void kagome::metrics::SessionImpl::onWrite |
( |
bool |
close, |
|
|
boost::system::error_code |
ec, |
|
|
std::size_t |
|
|
) |
| |
|
private |
void kagome::metrics::SessionImpl::reportError |
( |
boost::system::error_code |
ec, |
|
|
std::string_view |
message |
|
) |
| |
|
private |
reports error code and message
- Parameters
-
ec | error code |
message | error message |
Definition at line 92 of file session_impl.cpp.
void kagome::metrics::SessionImpl::respond |
( |
Response |
response | ) |
|
|
overridevirtual |
Socket& kagome::metrics::SessionImpl::socket |
( |
| ) |
|
|
inlineoverridevirtual |
void kagome::metrics::SessionImpl::start |
( |
| ) |
|
|
overridevirtual |
void kagome::metrics::SessionImpl::stop |
( |
| ) |
|
|
private |
boost::beast::flat_buffer kagome::metrics::SessionImpl::buffer_ |
|
private |
constexpr boost::string_view kagome::metrics::SessionImpl::kServerName = "Kagome" |
|
staticprivate |
std::unique_ptr<Parser> kagome::metrics::SessionImpl::parser_ |
|
private |
std::shared_ptr<void> kagome::metrics::SessionImpl::res_ |
|
private |
boost::asio::strand<boost::asio::io_context::executor_type> kagome::metrics::SessionImpl::strand_ |
|
private |
Strand to ensure the connection's handlers are not called concurrently.
Definition at line 104 of file session_impl.hpp.
boost::beast::tcp_stream kagome::metrics::SessionImpl::stream_ |
|
private |
The documentation for this class was generated from the following files: