24 lines
456 B
C++
24 lines
456 B
C++
#pragma once
|
|
#include "Utils/ThreadPool.hpp"
|
|
|
|
namespace Chattr {
|
|
class IOCP {
|
|
public:
|
|
IOCP(std::shared_ptr<ThreadPool> __IOCPThread);
|
|
~IOCP();
|
|
|
|
void init(std::shared_ptr<ThreadPool> __IOCPThread);
|
|
|
|
int recv(void* __restrict __buf, size_t __n, int __flags);
|
|
int send(const void* __buf, size_t __n, int __flags);
|
|
|
|
private:
|
|
std::shared_ptr<ThreadPool> IOCPThread_;
|
|
|
|
#ifdef _WIN32
|
|
HANDLE completinPort_;
|
|
#elif __linux__
|
|
|
|
#endif
|
|
};
|
|
} |