40 App::App(std::vector<std::unique_ptr<Interface>> interfaces)
43 for (
auto &interface : interfaces)
46 std::make_unique<InterfaceThreader>(
62 for (
auto &interface : threaders_)
70 sigemptyset(&waitset);
71 sigaddset(&waitset, SIGINT);
72 sigprocmask(SIG_BLOCK, &waitset,
nullptr);
75 if (sigwait(&waitset, &sig) < 0)
77 throw std::system_error(std::error_code(errno, std::system_category()));
81 throw std::runtime_error(
"Microsoft Windows is not currently supported.")
85 for (
auto &interface : threaders_)
87 interface->shutdown();
Delay starting, use start to launch threads.
App(std::vector< std::unique_ptr< Interface >> interfaces)