iocp 구현하기
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user