Files
maxDcb-C2Core/beacon/BeaconSmbLauncher.cpp
T
2023-05-08 03:45:20 -04:00

31 lines
420 B
C++

#include "BeaconSmb.hpp"
using namespace std;
int main(int argc, char* argv[])
{
std::string ip = "127.0.0.1";
if(argc > 1)
ip = argv[1];
int port = 4444;
if (argc > 2)
port = atoi(argv[2]);
std::unique_ptr<Beacon> beacon;
beacon = make_unique<BeaconSmb>(ip, port);
bool exit = false;
while (!exit)
{
beacon->checkIn();
exit = beacon->runTasks();
beacon->sleep();
}
beacon->checkIn();
}