Files
stvpn/sockhand.hpp
Олег Бородин 5a2985f936 working commit
2026-05-21 14:15:03 +02:00

27 lines
514 B
C++

#ifndef SOCKHAND_HPP
#define SOCKHAND_HPP
#include <expected>
#include <semaphore>
#include <string>
#include <mutex>
#include <interface.hpp>
class SocketHandler {
private:
int sock;
std::mutex intMtx;
std::binary_semaphore done{0};
Interface interface;
std::string tunAddress;
public:
void Handle(int newsock, std::string laddr, std::string raddr, std::vector<std::string> routes);
void RecvMessages(void);
void SendMessages(void);
};
#endif