Malloy
Toggle main menu visibility
Loading...
Searching...
No Matches
lib
malloy
server
http
connection_detector.hpp
1
#pragma once
2
3
#include "../../core/tcp/stream.hpp"
4
5
#include <boost/beast/core.hpp>
6
7
#include <filesystem>
8
9
namespace
boost::asio::ssl
10
{
11
class
context;
12
}
13
14
namespace
spdlog
15
{
16
class
logger;
17
}
18
19
namespace
malloy::server
20
{
21
class
router
;
22
}
23
24
namespace
malloy::server::http
25
{
26
31
class
connection_detector
:
32
public
std::enable_shared_from_this<connection_detector>
33
{
34
public
:
44
connection_detector
(
45
std::shared_ptr<spdlog::logger> logger,
46
boost::asio::ip::tcp::socket&& socket,
47
std::shared_ptr<boost::asio::ssl::context> ctx,
48
std::shared_ptr<const std::filesystem::path> doc_root,
49
std::shared_ptr<malloy::server::router>
router
,
50
std::string agent_string
51
);
52
56
void
57
run
();
58
59
private
:
60
std::shared_ptr<spdlog::logger> m_logger;
61
malloy::tcp::stream<>
m_stream;
62
std::shared_ptr<boost::asio::ssl::context> m_ctx;
63
boost::beast::flat_buffer m_buffer;
64
std::shared_ptr<const std::filesystem::path> m_doc_root;
65
std::shared_ptr<malloy::server::router> m_router;
66
std::string m_agent_string;
67
68
void
69
on_detect(boost::beast::error_code ec,
bool
result);
70
};
71
72
}
malloy::server::http::connection_detector::connection_detector
connection_detector(std::shared_ptr< spdlog::logger > logger, boost::asio::ip::tcp::socket &&socket, std::shared_ptr< boost::asio::ssl::context > ctx, std::shared_ptr< const std::filesystem::path > doc_root, std::shared_ptr< malloy::server::router > router, std::string agent_string)
Definition
connection_detector.cpp:78
malloy::server::http::connection_detector::run
void run()
Definition
connection_detector.cpp:99
malloy::server::router
Definition
router.hpp:103
malloy::tcp::stream
boost::beast::basic_stream< boost::asio::ip::tcp, boost::asio::any_io_executor, RatePolicy > stream
Definition
stream.hpp:18
Generated by
1.18.0