A high-level controller.
More...
#include <routing_context.hpp>
|
|
| routing_context (config cfg) |
|
| routing_context (const routing_context &other)=delete |
|
| routing_context (routing_context &&other) noexcept=default |
|
routing_context & | operator= (const routing_context &rhs)=delete |
|
routing_context & | operator= (routing_context &&rhs) noexcept=default |
| bool | init_tls (const std::filesystem::path &cert_path, const std::filesystem::path &key_path) |
| bool | init_tls (const std::string &cert, const std::string &key) |
| constexpr const malloy::server::router & | router () const noexcept |
| constexpr malloy::server::router & | router () noexcept |
|
|
session | start (routing_context &&ctrl) |
A high-level controller.
This is a high-level controller for convenience. It will setup the necessary I/O context and worker threads.
◆ init_tls() [1/2]
| bool routing_context::init_tls |
( |
const std::filesystem::path & | cert_path, |
|
|
const std::filesystem::path & | key_path ) |
Initialize the TLS context.
- Note
- This must be called after init() but before start() if TLS is to be used.
- Parameters
-
| cert_path | Path to the certificate file. |
| key_path | Path to the key file. |
- Returns
- Whether the initialization was successful.
◆ init_tls() [2/2]
| bool routing_context::init_tls |
( |
const std::string & | cert, |
|
|
const std::string & | key ) |
Initialize the TLS context.
- Note
- This must be called after init() but before start() if TLS is to be used.
- Parameters
-
| cert | The certificate file (contents). |
| key | The key file (contents). |
- Returns
- Whether the initialization was successful.
◆ router() [1/2]
|
|
inlinenodiscardconstexprnoexcept |
Get the top-level router.
- Returns
- The top-level router.
◆ router() [2/2]
|
|
inlinenodiscardconstexprnoexcept |
Get the top-level router.
- Returns
- The top-level router.
The documentation for this class was generated from the following files: