SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Comm::Protocol::Mngr::Req::Echo Class Reference

#include <swcdb/db/Protocol/Mngr/req/Echo.h>

+ Inheritance diagram for SWC::Comm::Protocol::Mngr::Req::Echo:
+ Collaboration diagram for SWC::Comm::Protocol::Mngr::Req::Echo:

Public Types

typedef std::function< void(bool)> EchoCb_t
 
- Public Types inherited from SWC::Comm::DispatchHandler
typedef std::shared_ptr< DispatchHandlerPtr
 

Public Member Functions

 Echo (const ConnHandlerPtr &a_conn, EchoCb_t &&a_cb, size_t buf_sz=0)
 
virtual ~Echo () noexcept
 
bool run () override
 
void handle_no_conn () override
 
void handle (ConnHandlerPtr, const Event::Ptr &ev) override
 
- Public Member Functions inherited from SWC::Comm::DispatchHandler
virtual bool valid ()
 

Private Attributes

ConnHandlerPtr conn
 
EchoCb_t cb
 
Buffers::Ptr cbp
 

Additional Inherited Members

- Protected Member Functions inherited from SWC::Comm::DispatchHandler
virtual ~DispatchHandler () noexcept
 

Detailed Description

Definition at line 15 of file Echo.h.

Member Typedef Documentation

◆ EchoCb_t

typedef std::function<void(bool)> SWC::Comm::Protocol::Mngr::Req::Echo::EchoCb_t

Definition at line 17 of file Echo.h.

Constructor & Destructor Documentation

◆ Echo()

SWC::Comm::Protocol::Mngr::Req::Echo::Echo ( const ConnHandlerPtr a_conn,
EchoCb_t &&  a_cb,
size_t  buf_sz = 0 
)
inline

Definition at line 19 of file Echo.h.

References SWC::Core::Buffer< T >::base, cbp, SWC::Comm::Protocol::Mngr::DO_ECHO, and SWC::Comm::Buffers::make().

+ Here is the call graph for this function:

◆ ~Echo()

virtual SWC::Comm::Protocol::Mngr::Req::Echo::~Echo ( )
inlinevirtualnoexcept

Definition at line 45 of file Echo.h.

Member Function Documentation

◆ handle()

void SWC::Comm::Protocol::Mngr::Req::Echo::handle ( ConnHandlerPtr  ,
const Event::Ptr ev 
)
inlineoverridevirtual

Implements SWC::Comm::DispatchHandler.

Definition at line 55 of file Echo.h.

References cb, and SWC::Comm::Protocol::Mngr::DO_ECHO.

◆ handle_no_conn()

void SWC::Comm::Protocol::Mngr::Req::Echo::handle_no_conn ( )
inlineoverridevirtual

Implements SWC::Comm::DispatchHandler.

Definition at line 51 of file Echo.h.

References cb.

◆ run()

bool SWC::Comm::Protocol::Mngr::Req::Echo::run ( )
inlineoverridevirtual

Reimplemented from SWC::Comm::DispatchHandler.

Definition at line 47 of file Echo.h.

References cbp, and conn.

Member Data Documentation

◆ cb

EchoCb_t SWC::Comm::Protocol::Mngr::Req::Echo::cb
private

Definition at line 63 of file Echo.h.

Referenced by handle(), and handle_no_conn().

◆ cbp

Buffers::Ptr SWC::Comm::Protocol::Mngr::Req::Echo::cbp
private

Definition at line 64 of file Echo.h.

Referenced by Echo(), and run().

◆ conn

ConnHandlerPtr SWC::Comm::Protocol::Mngr::Req::Echo::conn
private

Definition at line 62 of file Echo.h.

Referenced by run().


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