FaceAccess/VoucherVerifyServer/main.cpp

18 lines
706 B
C++
Raw Normal View History

2024-06-18 14:27:48 +08:00
#include "BoostLog.h"
#include "IoContext.h"
#include "Listener.h"
#include "SharedState.h"
int main(int argc, char const *argv[])
{
using namespace boost::asio::ip;
boost::log::initialize("/data/sdcard/logs/VoucherVerifyServer", "/data/sdcard/logs");
auto ioContext = Amass::Singleton<IoContext>::instance<Amass::Construct>(std::thread::hardware_concurrency());
auto sharedState = Amass::Singleton<SharedState>::instance<Amass::Construct>(*ioContext->ioContext());
auto listener =
std::make_shared<Listener>(*ioContext->ioContext(), tcp::endpoint{tcp::v4(), 3392}, sharedState);
listener->startAccept();
ioContext->run<IoContext::Mode::Synchronous>();
return 0;
}