TARAXA
dev::p2p::Node Class Reference

#include <Common.h>

Collaboration diagram for dev::p2p::Node:

Public Member Functions

virtual ~Node ()=default
 
 Node (Node const &)
 
 Node (Public _publicKey, NodeIPEndpoint const &_ip, PeerType _peerType=PeerType::Optional)
 
 Node (NodeSpec const &_s, PeerType _peerType=PeerType::Optional)
 
NodeID const & address () const
 
NodeIPEndpoint get_endpoint () const
 
void set_endpoint (NodeIPEndpoint endpoint)
 
 operator bool () const
 

Public Attributes

NodeID const id
 
std::atomic< PeerTypepeerType {PeerType::Optional}
 
std::atomic< uint16_t > external_udp_port
 

Private Attributes

NodeIPEndpoint endpoint_
 
std::shared_mutex endpoint_mu_
 

Constructor & Destructor Documentation

◆ ~Node()

virtual dev::p2p::Node::~Node ( )
virtualdefault

◆ Node() [1/3]

dev::p2p::Node::Node ( Node const &  _original)

◆ Node() [2/3]

dev::p2p::Node::Node ( Public  _publicKey,
NodeIPEndpoint const &  _ip,
PeerType  _peerType = PeerType::Optional 
)
inline

◆ Node() [3/3]

dev::p2p::Node::Node ( NodeSpec const &  _s,
PeerType  _peerType = PeerType::Optional 
)

Member Function Documentation

◆ address()

NodeID const& dev::p2p::Node::address ( ) const
inline

◆ get_endpoint()

NodeIPEndpoint dev::p2p::Node::get_endpoint ( ) const

◆ operator bool()

dev::p2p::Node::operator bool ( ) const
inlineexplicit

◆ set_endpoint()

void dev::p2p::Node::set_endpoint ( NodeIPEndpoint  endpoint)

Member Data Documentation

◆ endpoint_

NodeIPEndpoint dev::p2p::Node::endpoint_
private

◆ endpoint_mu_

std::shared_mutex dev::p2p::Node::endpoint_mu_
mutableprivate

◆ external_udp_port

std::atomic<uint16_t> dev::p2p::Node::external_udp_port

◆ id

NodeID const dev::p2p::Node::id

◆ peerType

std::atomic<PeerType> dev::p2p::Node::peerType {PeerType::Optional}

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