mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-07 15:20:31 +00:00
36 lines
536 B
C++
36 lines
536 B
C++
|
#pragma once
|
||
|
|
||
|
#include <tooling/router_event.hpp>
|
||
|
|
||
|
#include <util/thread/queue.hpp>
|
||
|
|
||
|
namespace tooling
|
||
|
{
|
||
|
|
||
|
struct RouterHive
|
||
|
{
|
||
|
constexpr size_t MAX_EVENT_QUEUE_SIZE = 200;
|
||
|
|
||
|
RouterHive(size_t eventQueueSize = MAX_EVENT_QUEUE_SIZE);
|
||
|
|
||
|
void
|
||
|
InformEvent(RouterEvent event);
|
||
|
|
||
|
void
|
||
|
ProcessEventQueue();
|
||
|
|
||
|
|
||
|
/*
|
||
|
* Event processing function declarations
|
||
|
*/
|
||
|
|
||
|
void
|
||
|
ProcessPathBuildAttempt(PathBuildAttemptEvent event);
|
||
|
|
||
|
|
||
|
|
||
|
llarp::thread::Queue<RouterEvent> eventQueue;
|
||
|
};
|
||
|
|
||
|
} // namespace tooling
|