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

#include <node_to_node.h>

Inherited by ccf::NodeToNodeChannelManager.

Classes

class  DroppedMessageException
 

Public Member Functions

virtual ~NodeToNode ()=default
 
virtual void associate_node_address (const NodeId &peer_id, const std::string &peer_hostname, const std::string &peer_service)=0
 
virtual void close_channel (const NodeId &peer_id)=0
 
virtual bool have_channel (const NodeId &nid)=0
 
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)
 
virtual bool send_authenticated (const NodeId &to, NodeMsgType type, const uint8_t *data, size_t size)=0
 
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)
 
virtual bool recv_authenticated_with_load (const NodeId &from, const uint8_t *&data, size_t &size)=0
 
virtual bool recv_authenticated (const NodeId &from, std::span< const uint8_t > header, const uint8_t *&data, size_t &size)=0
 
virtual bool recv_channel_message (const NodeId &from, const uint8_t *data, size_t size)=0
 
virtual 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=std::nullopt)=0
 
virtual void set_endorsed_node_cert (const ccf::crypto::Pem &endorsed_node_cert)=0
 
virtual bool send_encrypted (const NodeId &to, NodeMsgType type, std::span< const uint8_t > header, const std::vector< uint8_t > &data)=0
 
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)
 
virtual std::vector< uint8_t > recv_encrypted (const NodeId &from, std::span< const uint8_t > header, const uint8_t *data, size_t size)=0
 
virtual void set_message_limit (size_t message_limit)=0
 
virtual void set_idle_timeout (std::chrono::milliseconds idle_timeout)=0
 
virtual void tick (std::chrono::milliseconds elapsed)=0
 

Constructor & Destructor Documentation

◆ ~NodeToNode()

virtual ccf::NodeToNode::~NodeToNode ( )
virtualdefault

Member Function Documentation

◆ associate_node_address()

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

◆ close_channel()

virtual void ccf::NodeToNode::close_channel ( const NodeId peer_id)
pure virtual

◆ have_channel()

virtual bool ccf::NodeToNode::have_channel ( const NodeId nid)
pure virtual

◆ initialize()

virtual void ccf::NodeToNode::initialize ( const NodeId self_id,
const ccf::crypto::Pem service_cert,
ccf::crypto::KeyPairPtr  node_kp,
const std::optional< ccf::crypto::Pem > &  node_cert = std::nullopt 
)
pure virtual

◆ recv_authenticated() [1/2]

template<class T >
const T & ccf::NodeToNode::recv_authenticated ( const NodeId from,
const uint8_t *&  data,
size_t &  size 
)
inline

◆ recv_authenticated() [2/2]

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

◆ recv_authenticated_with_load() [1/2]

template<class T >
const T & ccf::NodeToNode::recv_authenticated_with_load ( const NodeId from,
const uint8_t *&  data,
size_t &  size 
)
inline

◆ recv_authenticated_with_load() [2/2]

virtual bool ccf::NodeToNode::recv_authenticated_with_load ( const NodeId from,
const uint8_t *&  data,
size_t &  size 
)
pure virtual

◆ recv_channel_message()

virtual bool ccf::NodeToNode::recv_channel_message ( const NodeId from,
const uint8_t *  data,
size_t  size 
)
pure virtual

◆ recv_encrypted() [1/2]

template<class T >
std::pair< T, std::vector< uint8_t > > ccf::NodeToNode::recv_encrypted ( const NodeId from,
const uint8_t *&  data,
size_t &  size 
)
inline

◆ recv_encrypted() [2/2]

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

◆ send_authenticated() [1/3]

template<>
bool ccf::NodeToNode::send_authenticated ( const NodeId to,
NodeMsgType  type,
const std::vector< uint8_t > &  data 
)
inline

◆ send_authenticated() [2/3]

template<class T >
bool ccf::NodeToNode::send_authenticated ( const NodeId to,
NodeMsgType  type,
const T &  data 
)
inline

◆ send_authenticated() [3/3]

virtual bool ccf::NodeToNode::send_authenticated ( const NodeId to,
NodeMsgType  type,
const uint8_t *  data,
size_t  size 
)
pure virtual

◆ send_encrypted() [1/2]

template<class T >
bool ccf::NodeToNode::send_encrypted ( const NodeId to,
NodeMsgType  type,
const std::vector< uint8_t > &  data,
const T &  msg_hdr 
)
inline

◆ send_encrypted() [2/2]

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

◆ set_endorsed_node_cert()

virtual void ccf::NodeToNode::set_endorsed_node_cert ( const ccf::crypto::Pem endorsed_node_cert)
pure virtual

◆ set_idle_timeout()

virtual void ccf::NodeToNode::set_idle_timeout ( std::chrono::milliseconds  idle_timeout)
pure virtual

◆ set_message_limit()

virtual void ccf::NodeToNode::set_message_limit ( size_t  message_limit)
pure virtual

◆ tick()

virtual void ccf::NodeToNode::tick ( std::chrono::milliseconds  elapsed)
pure virtual

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