working commit

This commit is contained in:
Олег Бородин
2026-05-20 17:15:26 +02:00
parent 0d37d45543
commit 3f261b0922
5 changed files with 40 additions and 14 deletions
+3 -5
View File
@@ -8,10 +8,7 @@
#include <sockhand.hpp>
class ClientSlot {
private:
bool free;
int num;
class NetworkSlot {
};
@@ -19,11 +16,12 @@ class TunService {
private:
std::string tunnelnet;
std::vector<std::string> localnets;
std::vector<NetworkSlot> netslots;
int listenport;
int sock;
std::vector<ClientSlot> clientSlots;
public:
explicit TunService(int port, std::string tunnelnet, std::vector<std::string> localnets);
std::expected<void, std::string> Init(void);
std::expected<void, std::string> Bind(void);
std::expected<void, std::string> Listen(void);
void Handle(int sock);