ndi *
try
{
Server server(cfg);
server.start();
server.wait_for_downstream();
}
catch (const std::exception& ex)
{
std::println("{}", ex.what());
}
if (!res.has_value())
{
std::println(stderr, "{}", res.error());
}
std::unique_ptr<imr::Server> server{*res};
server->start();
server->wait_for_downstream();
std::expected< std::unique_ptr< Server >, std::string > make_server(const Server::Config &cfg) noexcept
Allows you to construct server without try/catch block to handle configuration errors.
Aggregate for configuration of all server components.
Definition server.h:64