#include <swcdb/core/comm/ConnHandler.h>
Public Types | |
typedef std::shared_ptr< ConnHandlerSSL > | Ptr |
Public Member Functions | |
virtual | ~ConnHandlerSSL () noexcept |
bool | is_secure () const noexcept override |
void | do_close () noexcept override |
bool | is_open () const noexcept override |
template<typename T > | |
void | set_verify (T &&hdlr) noexcept |
template<typename T > | |
void | handshake (SocketSSL::handshake_type typ, T &&hdlr) noexcept |
void | handshake (SocketSSL::handshake_type typ, asio::error_code &ec) noexcept |
Public Member Functions inherited from SWC::Comm::ConnHandler | |
ConnHandler (const ConnHandler &)=delete | |
ConnHandler (ConnHandler &&)=delete | |
ConnHandler & | operator= (const ConnHandler &)=delete |
ConnHandler & | operator= (ConnHandler &&)=delete |
SWC_CAN_INLINE size_t | endpoint_remote_hash () const noexcept |
SWC_CAN_INLINE size_t | endpoint_local_hash () const noexcept |
SWC_CAN_INLINE Core::Encoder::Type | get_encoder () const noexcept |
void | new_connection () |
size_t | pending_read () noexcept |
SWC_CAN_INLINE bool | due () |
bool | send_error (int error, const std::string &msg, const Event::Ptr &ev) noexcept |
bool | response_ok (const Event::Ptr &ev) noexcept |
bool | send_response (Buffers::Ptr cbuf, DispatchHandler::Ptr hdlr=nullptr) noexcept |
bool | send_request (Buffers::Ptr cbuf, DispatchHandler::Ptr hdlr) |
void | print (std::ostream &out) const |
Static Public Member Functions | |
static Ptr | make (AppContext::Ptr &app_ctx, asio::ssl::context &ssl_ctx, SocketPlain &socket) |
Protected Member Functions | |
SocketLayer *SWC_CONST_FUNC | socket_layer () noexcept override |
void | read (uint8_t **bufp, size_t *remainp, asio::error_code &ec) override |
void | do_async_write (Core::Vector< asio::const_buffer > &&buffers, Sender_noAck &&hdlr) noexcept override |
void | do_async_write (Core::Vector< asio::const_buffer > &&buffers, Sender_Ack &&hdlr) noexcept override |
void | do_async_read (uint8_t *data, uint32_t sz, Receiver_HeaderPrefix &&hdlr) noexcept override |
void | do_async_read (uint8_t *data, uint32_t sz, Receiver_Header &&hdlr) noexcept override |
void | do_async_read (uint8_t *data, uint32_t sz, Receiver_Buffer &&hdlr) noexcept override |
Protected Member Functions inherited from SWC::Comm::ConnHandler | |
SWC_CAN_INLINE | ConnHandler (AppContext::Ptr &a_app_ctx) noexcept |
SWC_CAN_INLINE ConnHandlerPtr | ptr () noexcept |
virtual | ~ConnHandler () noexcept |
void | do_close_run () noexcept |
void | disconnected () noexcept |
Private Member Functions | |
ConnHandlerSSL (AppContext::Ptr &app_ctx, asio::ssl::context &ssl_ctx, SocketPlain &socket) noexcept | |
Private Attributes | |
SocketSSL | m_sock |
asio::strand< SocketSSL::executor_type > | m_strand |
Additional Inherited Members | |
Public Attributes inherited from SWC::Comm::ConnHandler | |
Core::AtomicBool | connected |
const AppContext::Ptr | app_ctx |
EndPoint | endpoint_remote |
EndPoint | endpoint_local |
Protected Attributes inherited from SWC::Comm::ConnHandler | |
Core::MutexSptd | m_mutex |
Definition at line 296 of file ConnHandler.h.
typedef std::shared_ptr<ConnHandlerSSL> SWC::Comm::ConnHandlerSSL::Ptr |
Definition at line 299 of file ConnHandler.h.
|
virtualnoexcept |
Definition at line 674 of file ConnHandler.cc.
References is_open(), and m_sock.
|
privatenoexcept |
Definition at line 665 of file ConnHandler.cc.
Referenced by make().
|
overrideprotectedvirtualnoexcept |
|
overrideprotectedvirtualnoexcept |
|
overrideprotectedvirtualnoexcept |
|
overrideprotectedvirtualnoexcept |
Implements SWC::Comm::ConnHandler.
Definition at line 741 of file ConnHandler.cc.
References buffers.
|
overrideprotectedvirtualnoexcept |
Implements SWC::Comm::ConnHandler.
Definition at line 731 of file ConnHandler.cc.
References buffers.
|
overridevirtualnoexcept |
Implements SWC::Comm::ConnHandler.
Definition at line 681 of file ConnHandler.cc.
References SWC::Core::AtomicBase< T, OrderT >::compare_exchange_weak(), SWC::Comm::ConnHandler::connected, SWC::Comm::ConnHandler::disconnected(), SWC::Comm::ConnHandler::do_close_run(), and m_sock.
|
noexcept |
Definition at line 712 of file ConnHandler.cc.
|
inlinenoexcept |
Definition at line 318 of file ConnHandler.h.
References SWC::Comm::ConnHandlerPlain::m_sock.
|
overridevirtualnoexcept |
Implements SWC::Comm::ConnHandler.
Definition at line 708 of file ConnHandler.cc.
References SWC::Comm::ConnHandler::connected, and m_sock.
Referenced by ~ConnHandlerSSL().
|
inlineoverridevirtualnoexcept |
Reimplemented from SWC::Comm::ConnHandler.
Definition at line 306 of file ConnHandler.h.
|
static |
Definition at line 660 of file ConnHandler.cc.
References SWC::Comm::ConnHandler::app_ctx, and ConnHandlerSSL().
Referenced by SWC::Comm::ConfigSSL::make_connection().
|
overrideprotectedvirtual |
Implements SWC::Comm::ConnHandler.
Definition at line 779 of file ConnHandler.cc.
References m_sock, and SWC::Comm::ConnHandler::read().
|
inlinenoexcept |
Definition at line 313 of file ConnHandler.h.
References SWC::Comm::ConnHandlerPlain::m_sock.
|
overrideprotectedvirtualnoexcept |
Implements SWC::Comm::ConnHandler.
Definition at line 723 of file ConnHandler.cc.
References m_sock.
|
private |
Definition at line 357 of file ConnHandler.h.
Referenced by do_close(), is_open(), read(), socket_layer(), and ~ConnHandlerSSL().
|
private |
Definition at line 358 of file ConnHandler.h.