iocp 구현하기

This commit is contained in:
2025-05-31 03:19:58 +09:00
parent 466a80f02b
commit a65483a9c3
55 changed files with 608 additions and 683 deletions

View File

@@ -7,16 +7,24 @@
#include "socket/iocp.h"
#include "utils/thread_pool.h"
namespace happytanuki {
namespace Network {
enum class SessionProtocol { UDP, TCP, TLS, QUIC };
enum class SessionType { LISTEN, CONNECT };
class Session {
public:
Session(utils::ThreadPool* tp, SessionProtocol proto);
Session(gsl::not_null<Network::IOCP*> iocp, utils::ThreadPool* tp,
SessionType type, SessionProtocol proto, Network::Address addr);
~Session();
private:
Socket::IOCP iocp_;
utils::ThreadPool* tp_;
gsl::not_null<Network::IOCP*> iocp_;
utils::ThreadPool* tp_ = nullptr;
SessionProtocol proto_;
Network::Socket* sock_ = nullptr;
SSL_CTX* ssl_ctx_ = nullptr;
SSL* ssl_ = nullptr;
};
} // namespace happytanuki
} // namespace Network