20 lines
525 B
C++
Raw Normal View History

2025-05-05 23:30:28 +08:00
#include "RelayServer.h"
2025-05-11 00:00:10 +08:00
#include <Util.h>
#include <wx/init.h>
#include <wx/log.h>
2025-05-05 23:30:28 +08:00
2025-05-11 00:00:10 +08:00
int main(int argc, char** argv)
2025-05-05 23:30:28 +08:00
{
2025-05-11 00:00:10 +08:00
wxInitializer initializer(argc, argv);
2025-05-10 01:25:02 +08:00
if (!initializer.IsOk()) {
fprintf(stderr, "Failed to initialize the wxWidgets library, aborting.");
return -1;
}
2025-05-11 00:00:10 +08:00
auto* dl = wxLog::GetActiveTarget();
dl->SetFormatter(new MLogFormatter());
auto server_ = std::make_unique<RelayServer>();
2025-05-10 01:25:02 +08:00
if (server_->Init("127.0.0.1", 8080)) {
server_->Run();
}
return 0;
}