working commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef TSERVICE_HPP
|
||||
#define TSERVICE_HPP
|
||||
|
||||
#include <expected>
|
||||
#include <string>
|
||||
|
||||
#include <sockhand.hpp>
|
||||
|
||||
class TCPService {
|
||||
private:
|
||||
int port;
|
||||
int sock;
|
||||
public:
|
||||
explicit TCPService(int port);
|
||||
std::expected<void, std::string> Bind(void);
|
||||
std::expected<void, std::string> Listen(void);
|
||||
void Handle(int sock);
|
||||
~TCPService();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user