FaceAccess/VoucherVerifyServer/main.cpp
2024-11-13 19:25:23 +08:00

18 lines
676 B
C++

#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();
return 0;
}