2020-06-29 17:44:13 +02:00
|
|
|
#include <tooling/hive_router.hpp>
|
|
|
|
|
2020-07-01 21:46:52 +02:00
|
|
|
#include <tooling/router_hive.hpp>
|
|
|
|
|
2020-06-29 17:44:13 +02:00
|
|
|
namespace tooling
|
|
|
|
{
|
|
|
|
HiveRouter::HiveRouter(
|
2020-07-02 19:25:53 +02:00
|
|
|
llarp_ev_loop_ptr netloop, std::shared_ptr<llarp::Logic> logic, RouterHive* hive)
|
|
|
|
: Router(netloop, logic), m_hive(hive)
|
2020-06-29 17:44:13 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
HiveRouter::disableGossipingRC_TestingOnly()
|
|
|
|
{
|
|
|
|
return m_disableGossiping;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
HiveRouter::disableGossiping()
|
|
|
|
{
|
|
|
|
m_disableGossiping = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
HiveRouter::enableGossiping()
|
|
|
|
{
|
|
|
|
m_disableGossiping = true;
|
|
|
|
}
|
|
|
|
|
2020-07-01 21:46:52 +02:00
|
|
|
void
|
|
|
|
HiveRouter::HandleRouterEvent(RouterEventPtr event) const
|
|
|
|
{
|
|
|
|
m_hive->NotifyEvent(std::move(event));
|
|
|
|
}
|
|
|
|
|
2020-06-29 17:44:13 +02:00
|
|
|
} // namespace tooling
|