SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
Echo.h
Go to the documentation of this file.
1 /*
2  * SWC-DB© Copyright since 2019 Alex Kashirin <kashirin.alex@gmail.com>
3  * License details at <https://github.com/kashirin-alex/swc-db/#license>
4  */
5 
6 
7 #ifndef swcdb_manager_Protocol_handlers_Echo_h
8 #define swcdb_manager_Protocol_handlers_Echo_h
9 
10 
11 
12 namespace SWC { namespace Comm { namespace Protocol {
13 namespace Mngr { namespace Handler {
14 
15 void do_echo(const ConnHandlerPtr& conn, const Event::Ptr& ev) {
16  conn->send_response(
17  ev->data_ext.size
18  ? Buffers::make(ev, ev->data_ext)
19  : Buffers::make(ev)
20  );
21 }
22 
23 
24 }}}}}
25 
26 #endif // swcdb_manager_Protocol_handlers_Echo_h
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC::Comm::ConnHandlerPtr
std::shared_ptr< ConnHandler > ConnHandlerPtr
Definition: AppContext.h:17
SWC::Comm::Protocol::Mngr::Handler::do_echo
void do_echo(const ConnHandlerPtr &conn, const Event::Ptr &ev)
Definition: Echo.h:15
SWC::Comm::Buffers::make
static SWC_CAN_INLINE Ptr make(uint32_t reserve=0)
Definition: Buffers.h:27
SWC::Comm::Event::Ptr
std::shared_ptr< Event > Ptr
Definition: Event.h:33