working commit

This commit is contained in:
2026-04-22 18:15:05 +02:00
parent f1b7d9783d
commit 76c797b489
13 changed files with 207 additions and 135 deletions
+31
View File
@@ -0,0 +1,31 @@
#include <expected>
#include <string>
#include <chrono>
#include <cstring>
#include <thread>
#include <iostream>
#include <tunclient.hpp>
using namespace std::chrono_literals;
int main(int argc, char** argv) {
TClient cli;
auto createRes = cli.Create("tun10", "10.1.2.1", 30);
if (!createRes) {
std::cerr << "Error: " << createRes.error() << std::endl;
return 1;
}
auto runRes = cli.Run();
if (!runRes) {
std::cerr << "Error: " << runRes.error() << std::endl;
return 1;
}
//std::chrono::milliseconds timesleep(20s);
//std::this_thread::sleep_for(timesleep);
return 0;
}