18 lines
706 B
C++
18 lines
706 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<IoContext::Mode::Synchronous>();
|
||
|
return 0;
|
||
|
}
|