mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
13b01c86a6
-- Moved all RPCServer initialization logic to rpcserver constructor -- Fixed config logic, fxn binding to rpc address, fxn adding rpc cats -- router hive failed CI/CD resulting from outdated reference to rpcBindAddr -- ipc socket as default hidden from windows (for now) refactored config endpoint - added rpc call script (contrib/omq-rpc.py) - added new fxns to .ini config stuff - added delete .ini file functionality to config endpoint - added edge case control for config endpoint add commented out line in clang-form for header reorg later
41 lines
664 B
C++
41 lines
664 B
C++
#define CATCH_CONFIG_RUNNER
|
|
#include <catch2/catch.hpp>
|
|
|
|
#include <llarp/util/logging.hpp>
|
|
#include <llarp/util/service_manager.hpp>
|
|
|
|
#ifdef _WIN32
|
|
#include <winsock2.h>
|
|
int
|
|
startWinsock()
|
|
{
|
|
WSADATA wsockd;
|
|
int err;
|
|
err = ::WSAStartup(MAKEWORD(2, 2), &wsockd);
|
|
if (err)
|
|
{
|
|
perror("Failed to start Windows Sockets");
|
|
return err;
|
|
}
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
int
|
|
main(int argc, char* argv[])
|
|
{
|
|
llarp::sys::service_manager->disable();
|
|
llarp::log::reset_level(llarp::log::Level::off);
|
|
|
|
#ifdef _WIN32
|
|
if (startWinsock())
|
|
return -1;
|
|
#endif
|
|
|
|
int result = Catch::Session().run(argc, argv);
|
|
#ifdef _WIN32
|
|
WSACleanup();
|
|
#endif
|
|
return result;
|
|
}
|