CCF
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
ccf::NodeToNodeChannelManager Class Reference

#include <node_to_node_channel_manager.h>

Inherits ccf::NodeToNode.

Public Member Functions

 NodeToNodeChannelManager (ringbuffer::AbstractWriterFactory &writer_factory_)
 
void initialize (const NodeId &self_id, const ccf::crypto::Pem &service_cert, ccf::crypto::KeyPairPtr node_kp, const std::optional< ccf::crypto::Pem > &node_cert) override
 
void set_endorsed_node_cert (const ccf::crypto::Pem &endorsed_node_cert) override
 
void set_message_limit (size_t message_limit_) override
 
void set_idle_timeout (std::chrono::milliseconds idle_timeout_) override
 
void tick (std::chrono::milliseconds elapsed) override
 
virtual void associate_node_address (const NodeId &peer_id, const std::string &peer_hostname, const std::string &peer_service) override
 
bool have_channel (const ccf::NodeId &nid) override
 
bool send_authenticated (const NodeId &to, NodeMsgType type, const uint8_t *data, size_t size) override
 
bool send_encrypted (const NodeId &to, NodeMsgType type, std::span< const uint8_t > header, const std::vector< uint8_t > &data) override
 
bool recv_authenticated (const NodeId &from, std::span< const uint8_t > header, const uint8_t *&data, size_t &size) override
 
bool recv_authenticated_with_load (const NodeId &from, const uint8_t *&data, size_t &size) override
 
std::vector< uint8_t > recv_encrypted (const NodeId &from, std::span< const uint8_t > header, const uint8_t *data, size_t size) override
 
bool recv_channel_message (const NodeId &from, const uint8_t *data, size_t size) override
 
bool recv_channel_message (const NodeId &from, std::vector< uint8_t > &&body)
 
void close_channel (const NodeId &peer_id) override
 
bool channel_open (const NodeId &peer_id)
 
- Public Member Functions inherited from ccf::NodeToNode
virtual ~NodeToNode ()=default
 
template<class T >
bool send_authenticated (const NodeId &to, NodeMsgType type, const T &data)
 
template<>
bool send_authenticated (const NodeId &to, NodeMsgType type, const std::vector< uint8_t > &data)
 
template<class T >
const T & recv_authenticated (const NodeId &from, const uint8_t *&data, size_t &size)
 
template<class T >
const T & recv_authenticated_with_load (const NodeId &from, const uint8_t *&data, size_t &size)
 
template<class T >
bool send_encrypted (const NodeId &to, NodeMsgType type, const std::vector< uint8_t > &data, const T &msg_hdr)
 
template<class T >
std::pair< T, std::vector< uint8_t > > recv_encrypted (const NodeId &from, const uint8_t *&data, size_t &size)
 

Constructor & Destructor Documentation

◆ NodeToNodeChannelManager()

ccf::NodeToNodeChannelManager::NodeToNodeChannelManager ( ringbuffer::AbstractWriterFactory writer_factory_)
inline

Member Function Documentation

◆ associate_node_address()

virtual void ccf::NodeToNodeChannelManager::associate_node_address ( const NodeId peer_id,
const std::string &  peer_hostname,
const std::string &  peer_service 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ channel_open()

bool ccf::NodeToNodeChannelManager::channel_open ( const NodeId peer_id)
inline

◆ close_channel()

void ccf::NodeToNodeChannelManager::close_channel ( const NodeId peer_id)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ have_channel()

bool ccf::NodeToNodeChannelManager::have_channel ( const ccf::NodeId nid)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ initialize()

void ccf::NodeToNodeChannelManager::initialize ( const NodeId self_id,
const ccf::crypto::Pem service_cert,
ccf::crypto::KeyPairPtr  node_kp,
const std::optional< ccf::crypto::Pem > &  node_cert 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ recv_authenticated()

bool ccf::NodeToNodeChannelManager::recv_authenticated ( const NodeId from,
std::span< const uint8_t >  header,
const uint8_t *&  data,
size_t &  size 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ recv_authenticated_with_load()

bool ccf::NodeToNodeChannelManager::recv_authenticated_with_load ( const NodeId from,
const uint8_t *&  data,
size_t &  size 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ recv_channel_message() [1/2]

bool ccf::NodeToNodeChannelManager::recv_channel_message ( const NodeId from,
const uint8_t *  data,
size_t  size 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ recv_channel_message() [2/2]

bool ccf::NodeToNodeChannelManager::recv_channel_message ( const NodeId from,
std::vector< uint8_t > &&  body 
)
inline

◆ recv_encrypted()

std::vector< uint8_t > ccf::NodeToNodeChannelManager::recv_encrypted ( const NodeId from,
std::span< const uint8_t >  header,
const uint8_t *  data,
size_t  size 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ send_authenticated()

bool ccf::NodeToNodeChannelManager::send_authenticated ( const NodeId to,
NodeMsgType  type,
const uint8_t *  data,
size_t  size 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ send_encrypted()

bool ccf::NodeToNodeChannelManager::send_encrypted ( const NodeId to,
NodeMsgType  type,
std::span< const uint8_t >  header,
const std::vector< uint8_t > &  data 
)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ set_endorsed_node_cert()

void ccf::NodeToNodeChannelManager::set_endorsed_node_cert ( const ccf::crypto::Pem endorsed_node_cert)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ set_idle_timeout()

void ccf::NodeToNodeChannelManager::set_idle_timeout ( std::chrono::milliseconds  idle_timeout_)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ set_message_limit()

void ccf::NodeToNodeChannelManager::set_message_limit ( size_t  message_limit_)
inlineoverridevirtual

Implements ccf::NodeToNode.

◆ tick()

void ccf::NodeToNodeChannelManager::tick ( std::chrono::milliseconds  elapsed)
inlineoverridevirtual

Implements ccf::NodeToNode.


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