41 lines
784 B
C++
41 lines
784 B
C++
#ifndef seafire__routing__router_hxx_
|
|
#define seafire__routing__router_hxx_
|
|
|
|
#include <seafire/routing/diagnostics.hxx>
|
|
#include <seafire/routing/routing-table.hxx>
|
|
|
|
#include <seafire/common/diagnostics.hxx>
|
|
|
|
#include <seafire/server/request.hxx>
|
|
#include <seafire/server/response.hxx>
|
|
|
|
namespace seafire::routing
|
|
{
|
|
|
|
class router_t
|
|
{
|
|
public:
|
|
router_t(common::diagnostics_t&, routing_table_t);
|
|
|
|
routing_table_t const&
|
|
routing_table() const;
|
|
|
|
void
|
|
on_request(server::request_t&, server::response_t&) const;
|
|
|
|
void
|
|
operator()(server::request_t&, server::response_t&) const;
|
|
|
|
private:
|
|
common::diagnostics_t::proxy_t
|
|
trace() const;
|
|
|
|
common::diagnostics_t& diagnostics_;
|
|
routing_table_t rt_;
|
|
|
|
};
|
|
|
|
} // namespace seafire::routing
|
|
|
|
#endif
|