SWC-DB  v0.5.9 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Comm Namespace Reference

The SWC-DB Communications C++ namespace 'SWC::Comm'. More...


 The SWC-DB client C++ namespace 'SWC::Comm::client'.
 The SWC-DB Resolver C++ namespace 'SWC::Comm::Resolver'.
 The SWC-DB server C++ namespace 'SWC::Comm::server'.


class  AppContext
class  AppHandler
struct  BufferInfo
class  Buffers
class  ConfigSSL
class  ConnHandler
class  ConnHandlerPlain
class  ConnHandlerSSL
class  DispatchHandler
class  Event
struct  Header
class  IoContext
struct  Network
class  PeriodicTimer
class  PeriodicTimers
class  ResponseCallback
class  Serializable


typedef std::shared_ptr< ConnHandlerConnHandlerPtr
typedef void(* AppHandler_t) (const ConnHandlerPtr &conn, const Event::Ptr &ev)
using SocketLayer = asio::ip::tcp::socket::lowest_layer_type
using SocketPlain = asio::ip::tcp::socket
using SocketSSL = asio::ssl::stream< asio::ip::tcp::socket >
typedef std::shared_ptr< IoContextIoContextPtr
typedef asio::ip::tcp::endpoint EndPoint
typedef Core::Vector< EndPointEndPoints
typedef Core::Vector< NetworkNetworks
typedef Core::Vector< asio::ip::network_v4 > Networks_v4
typedef Core::Vector< asio::ip::network_v6 > Networks_v6


struct SWC::Comm::Header __attribute__ ((packed))
SWC_CAN_INLINE std::ostream & operator<< (std::ostream &out, const EndPoint &endpoint)
void print (std::ostream &out, const EndPoints &endpoints)
bool SWC_PURE_FUNC has_endpoint (const EndPoint &e1, const EndPoints &endpoints_in) noexcept
bool SWC_PURE_FUNC has_endpoint (const EndPoints &endpoints, const EndPoints &endpoints_in) noexcept
bool SWC_PURE_FUNC equal_endpoints (const EndPoints &endpoints1, const EndPoints &endpoints2) noexcept
size_t endpoints_hash (const EndPoints &endpoints)
size_t SWC_PURE_FUNC endpoint_hash (const EndPoint &endpoint) noexcept

Detailed Description

The SWC-DB Communications C++ namespace 'SWC::Comm'.

Typedef Documentation

◆ AppHandler_t

typedef void(* SWC::Comm::AppHandler_t) (const ConnHandlerPtr &conn, const Event::Ptr &ev)

Definition at line 15 of file AppHandler.h.

◆ ConnHandlerPtr

typedef std::shared_ptr<ConnHandler> SWC::Comm::ConnHandlerPtr

Definition at line 18 of file AppContext.h.

◆ EndPoint

typedef asio::ip::tcp::endpoint SWC::Comm::EndPoint

Definition at line 19 of file Resolver.h.

◆ EndPoints

Definition at line 20 of file Resolver.h.

◆ IoContextPtr

typedef std::shared_ptr<IoContext> SWC::Comm::IoContextPtr

Definition at line 17 of file IoContext.h.

◆ Networks

Definition at line 52 of file Resolver.h.

◆ Networks_v4

typedef Core::Vector<asio::ip::network_v4> SWC::Comm::Networks_v4

Definition at line 53 of file Resolver.h.

◆ Networks_v6

typedef Core::Vector<asio::ip::network_v6> SWC::Comm::Networks_v6

Definition at line 54 of file Resolver.h.

◆ SocketLayer

using SWC::Comm::SocketLayer = typedef asio::ip::tcp::socket::lowest_layer_type

Definition at line 24 of file ConnHandler.h.

◆ SocketPlain

using SWC::Comm::SocketPlain = typedef asio::ip::tcp::socket

Definition at line 25 of file ConnHandler.h.

◆ SocketSSL

using SWC::Comm::SocketSSL = typedef asio::ssl::stream<asio::ip::tcp::socket>

Definition at line 26 of file ConnHandler.h.

Function Documentation

◆ __attribute__()

struct SWC::Comm::BufferInfo SWC::Comm::__attribute__ ( (packed)  )

◆ endpoint_hash()

size_t SWC::Comm::endpoint_hash ( const EndPoint endpoint)

Definition at line 133 of file Resolver.cc.

Referenced by SWC::Manager::MngrRole::disconnection(), SWC::Comm::ConnHandler::endpoint_local_hash(), and SWC::Comm::ConnHandler::endpoint_remote_hash().

+ Here is the caller graph for this function:

◆ endpoints_hash()

size_t SWC::Comm::endpoints_hash ( const EndPoints endpoints)

Definition at line 120 of file Resolver.cc.

References SWC::Core::Vector< T, SizeT, GROW_SZ >::size(), and SWC::Core::to_string().

+ Here is the call graph for this function:

◆ equal_endpoints()

bool SWC::Comm::equal_endpoints ( const EndPoints endpoints1,
const EndPoints endpoints2 

Definition at line 108 of file Resolver.cc.

References has_endpoint().

Referenced by SWC::Ranger::Range::last_rgr_chk(), SWC::Manager::Rangers::rgr_set(), and SWC::Manager::Rangers::update_status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ has_endpoint() [1/2]

◆ has_endpoint() [2/2]

bool SWC::Comm::has_endpoint ( const EndPoints endpoints,
const EndPoints endpoints_in 

Definition at line 99 of file Resolver.cc.

References has_endpoint().

+ Here is the call graph for this function:

◆ operator<<()

SWC_CAN_INLINE std::ostream& SWC::Comm::operator<< ( std::ostream &  out,
const EndPoint endpoint 

Definition at line 24 of file Resolver.h.

◆ print()

void SWC::Comm::print ( std::ostream &  out,
const EndPoints endpoints