CCF
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ccf::TLSSession Class Reference

#include <tls_session.h>

Inherits std::enable_shared_from_this< TLSSession >.

Public Types

using HandshakeErrorCB = std::function< void(std::string &&)>
 

Public Member Functions

 TLSSession (int64_t session_id_, ringbuffer::AbstractWriterFactory &writer_factory_, std::unique_ptr< tls::Context > ctx_)
 
virtual ~TLSSession ()
 
SessionStatus get_status () const
 
void on_handshake_error (std::string &&error_msg)
 
void set_handshake_error_cb (HandshakeErrorCB &&cb)
 
std::string hostname ()
 
std::vector< uint8_t > peer_cert ()
 
size_t read (uint8_t *data, size_t size, bool exact=false)
 
void recv_buffered (const uint8_t *data, size_t size)
 
void close ()
 
virtual void close_thread ()
 
void send_raw (const uint8_t *data, size_t size)
 

Static Public Member Functions

static void close_cb (std::unique_ptr<::threading::Tmsg< EmptyMsg > > msg)
 

Protected Attributes

ringbuffer::WriterPtr to_host
 
::tcp::ConnID session_id
 
size_t execution_thread
 

Member Typedef Documentation

◆ HandshakeErrorCB

using ccf::TLSSession::HandshakeErrorCB = std::function<void(std::string&&)>

Constructor & Destructor Documentation

◆ TLSSession()

ccf::TLSSession::TLSSession ( int64_t  session_id_,
ringbuffer::AbstractWriterFactory writer_factory_,
std::unique_ptr< tls::Context ctx_ 
)
inline

◆ ~TLSSession()

virtual ccf::TLSSession::~TLSSession ( )
inlinevirtual

Member Function Documentation

◆ close()

void ccf::TLSSession::close ( )
inline

◆ close_cb()

static void ccf::TLSSession::close_cb ( std::unique_ptr<::threading::Tmsg< EmptyMsg > >  msg)
inlinestatic

◆ close_thread()

virtual void ccf::TLSSession::close_thread ( )
inlinevirtual

◆ get_status()

SessionStatus ccf::TLSSession::get_status ( ) const
inline

◆ hostname()

std::string ccf::TLSSession::hostname ( )
inline

◆ on_handshake_error()

void ccf::TLSSession::on_handshake_error ( std::string &&  error_msg)
inline

◆ peer_cert()

std::vector< uint8_t > ccf::TLSSession::peer_cert ( )
inline

◆ read()

size_t ccf::TLSSession::read ( uint8_t *  data,
size_t  size,
bool  exact = false 
)
inline

◆ recv_buffered()

void ccf::TLSSession::recv_buffered ( const uint8_t *  data,
size_t  size 
)
inline

◆ send_raw()

void ccf::TLSSession::send_raw ( const uint8_t *  data,
size_t  size 
)
inline

◆ set_handshake_error_cb()

void ccf::TLSSession::set_handshake_error_cb ( HandshakeErrorCB &&  cb)
inline

Member Data Documentation

◆ execution_thread

size_t ccf::TLSSession::execution_thread
protected

◆ session_id

::tcp::ConnID ccf::TLSSession::session_id
protected

◆ to_host

ringbuffer::WriterPtr ccf::TLSSession::to_host
protected

The documentation for this class was generated from the following file: