working commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
|
||||
#ifndef SOCKHAND_HPP
|
||||
#define SOCKHAND_HPP
|
||||
|
||||
#include <expected>
|
||||
#include <semaphore>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
class SocketHandler {
|
||||
private:
|
||||
int sock;
|
||||
std::mutex sockMtx;
|
||||
std::binary_semaphore done{0};
|
||||
public:
|
||||
void Handle(int newsock);
|
||||
void RecvMessages(void);
|
||||
void SendMessages(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user