TLSSession.h
Go to the documentation of this file.
#ifndef __TLSSession_h__
#define __TLSSession_h__
#include "includes"
#include "TCPSession.h"
#include "TLSServer.h"
#include <openssl/ssl.h>
namespace core {
class TLSServer;
class TLSSession : public TCPSession {
public:
TLSSession(EPoll &ePoll, TCPServer &server);
~TLSSession();
virtual void output(std::stringstream &out);
virtual void protocol(std::string data) override;
protected:
void receiveData(char *buffer, int bufferLength) override;
void onRegister();
void onRegistered();
private:
bool initialized = false;
SSL *ssl;
};
}
#endif
core::TLSSession::onRegister
void onRegister()
Called before the socket has registered with the epoll processing.
Definition: TLSSession.cpp:36
core::Socket::ePoll
EPoll & ePoll
Definition: Socket.h:117
core::EPoll
Definition: EPoll.h:31
core::TLSSession::onRegistered
void onRegistered()
Called after the socket has been registered with epoll processing.
Definition: TLSSession.cpp:58
core::TCPServer
Definition: TCPServer.h:24
core::TLSSession::receiveData
void receiveData(char *buffer, int bufferLength) override
Definition: TLSSession.cpp:85
core::TLSSession::~TLSSession
~TLSSession()
Definition: TLSSession.cpp:81
core::TLSSession
Definition: TLSSession.h:23
TLSServer.h
core::TLSSession::output
virtual void output(std::stringstream &out)
Definition: TLSSession.cpp:118
TCPSession.h
core::TCPSession
Definition: TCPSession.h:25
core
Definition: Command.cpp:5
core::TLSSession::TLSSession
TLSSession(EPoll &ePoll, TCPServer &server)
Definition: TLSSession.cpp:34
core::TCPSession::out
std::stringstream out
Definition: TCPSession.h:49
core::TLSSession::protocol
virtual void protocol(std::string data) override
Definition: TLSSession.cpp:83
core::TCPSession::server
TCPServer & server
Definition: TCPSession.h:83