#include <connection.hpp>
|
| connection (std::shared_ptr< spdlog::logger > logger, boost::beast::flat_buffer buffer, std::shared_ptr< handler > router, std::shared_ptr< const std::filesystem::path > http_doc_root) |
|
std::shared_ptr< spdlog::logger > | logger () const noexcept |
|
template<bool isRequest, class Body , class Fields > |
void | do_write (boost::beast::http::message< isRequest, Body, Fields > &&msg) |
|
void | do_read () |
|
|
boost::beast::flat_buffer | m_buffer |
|
template<class Derived>
class malloy::server::http::connection< Derived >
An HTTP server connection.
- Note
- This uses CRTP to allow using the same code for different connection types (eg. plain or TLS).
- See also
- connection_plain
-
connection_tls
◆ connection()
template<class Derived >
malloy::server::http::connection< Derived >::connection |
( |
std::shared_ptr< spdlog::logger > |
logger, |
|
|
boost::beast::flat_buffer |
buffer, |
|
|
std::shared_ptr< handler > |
router, |
|
|
std::shared_ptr< const std::filesystem::path > |
http_doc_root |
|
) |
| |
|
inline |
Constructor
- Parameters
-
logger | |
buffer | |
router | |
http_doc_root | |
◆ do_write()
template<class Derived >
template<bool isRequest, class Body , class Fields >
Perform an asynchronous write.
- Template Parameters
-
isRequest | Whether the message is a request (or a response). |
Body | The request body type. |
Fields | The request fields type. |
- Parameters
-
◆ logger()
Get the logger instance.
This allows different components to log to the connection specific logger.
- Returns
- The logger instance.
◆ cfg
The connection configuration.
The documentation for this class was generated from the following file: