My Project
TLSSession.h
1 #ifndef __TLSSession_h__
2 #define __TLSSession_h__
3 
4 #include "includes"
5 #include "TCPSession.h"
6 #include "TLSServer.h"
7 #include <openssl/ssl.h>
8 
9 namespace core {
10 
11  class TLSServer;
12 
22 
23  class TLSSession : public TCPSession {
24 
25  public:
26 
27  TLSSession(EPoll &ePoll, TCPServer &server);
28  ~TLSSession();
29 
36 
37  virtual void output(std::stringstream &out);
38  virtual void protocol(coreutils::ZString &data) override;
39 
40  protected:
41  void receiveData(coreutils::ZString &buffer) override;
42  void onRegister();
43  void onRegistered();
44 
45  private:
46  bool initialized = false;
47  SSL *ssl;
48 
49  };
50 
51 }
52 
53 #endif
Definition: EPoll.h:31
Definition: TCPServer.h:25
Definition: TCPSession.h:24
std::stringstream out
Definition: TCPSession.h:67
Definition: TLSSession.h:23
virtual void protocol(coreutils::ZString &data) override
Definition: TLSSession.cpp:83
void onRegister()
Called before the socket has registered with the epoll processing.
Definition: TLSSession.cpp:36
void receiveData(coreutils::ZString &buffer) override
Definition: TLSSession.cpp:85
void onRegistered()
Called after the socket has been registered with epoll processing.
Definition: TLSSession.cpp:58
virtual void output(std::stringstream &out)
Definition: TLSSession.cpp:118