Files
stvpn/server_test.cpp
T
2026-04-22 14:32:31 +02:00

26 lines
549 B
C++

#include <expected>
#include <string>
#include <chrono>
#include <cstring>
#include <thread>
#include <iostream>
#include <server.hpp>
using namespace std::chrono_literals;
int main(int argc, char** argv) {
Server srv;
auto createres = srv.Create("tun10", "10.1.2.1", 30);
if (!createres) {
std::cerr << "Error: " << createres.error() << std::endl;
return 1;
}
std::chrono::milliseconds timesleep(20s);
std::this_thread::sleep_for(timesleep);
return 0;
}