|
void | SetMsgProc (NetEventsInterface *msgproc) |
|
void | SetPeerConnectTimeout (std::chrono::seconds timeout) |
|
std::vector< CNode * > | TestNodes () |
|
void | AddTestNode (CNode &node) |
|
void | ClearTestNodes () |
|
void | NodeReceiveMsgBytes (CNode &node, Span< const uint8_t > msg_bytes, bool &complete) const |
|
bool | ReceiveMsgFrom (CNode &node, CSerializedNetMsg &&ser_msg) const |
|
void | FlushSendBuffer (CNode &node) const |
|
bool | AlreadyConnectedPublic (const CAddress &addr) |
|
CNode * | ConnectNodePublic (PeerManager &peerman, const char *pszDest, ConnectionType conn_type) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex) |
|
| CConnman (uint64_t seed0, uint64_t seed1, AddrMan &addrman, const NetGroupManager &netgroupman, const CChainParams ¶ms, bool network_active=true) |
|
void | Init (const Options &connOptions) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex |
|
const bool | use_v2transport (GetLocalServices() &NODE_P2P_V2) |
|
| for (const std::string &added_node :connOptions.m_added_nodes) |
|
| CConnman (uint64_t seed0, uint64_t seed1, AddrMan &addrman, const NetGroupManager &netgroupman, const CChainParams ¶ms, bool network_active=true) |
|
| ~CConnman () |
|
bool | Start (CScheduler &scheduler, const Options &options) EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex |
|
void | StopThreads () |
|
void | StopNodes () |
|
void | Stop () |
|
void | Interrupt () EXCLUSIVE_LOCKS_REQUIRED(!mutexMsgProc) |
|
bool | GetNetworkActive () const |
|
bool | GetUseAddrmanOutgoing () const |
|
void | SetNetworkActive (bool active) |
|
void | OpenNetworkConnection (const CAddress &addrConnect, bool fCountFailure, CSemaphoreGrant &&grant_outbound, const char *strDest, ConnectionType conn_type, bool use_v2transport) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex) |
|
bool | CheckIncomingNonce (uint64_t nonce) |
|
void | ASMapHealthCheck () |
|
RecursiveMutex & | GetNodesMutex () const LOCK_RETURNED(m_nodes_mutex) |
|
bool | ForNode (NodeId id, std::function< bool(CNode *pnode)> func) |
|
void | PushMessage (CNode *pnode, CSerializedNetMsg &&msg) EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex) |
|
void | ForEachNode (const NodeFn &func) |
|
void | ForEachNode (const NodeFn &func) const |
|
std::vector< CAddress > | GetAddresses (size_t max_addresses, size_t max_pct, std::optional< Network > network, const bool filtered=true) const |
| Return all or many randomly selected addresses, optionally by network. More...
|
|
std::vector< CAddress > | GetAddresses (CNode &requestor, size_t max_addresses, size_t max_pct) |
| Cache is used to minimize topology leaks, so it should be used for all non-trusted calls, for example, p2p. More...
|
|
void | SetTryNewOutboundPeer (bool flag) |
|
bool | GetTryNewOutboundPeer () const |
|
void | StartExtraBlockRelayPeers () |
|
int | GetFullOutboundConnCount () const |
|
int | GetExtraFullOutboundCount () const |
|
int | GetExtraBlockRelayCount () const |
|
bool | AddNode (const AddedNodeParams &add) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex) |
|
bool | RemoveAddedNode (const std::string &node) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex) |
|
bool | AddedNodesContain (const CAddress &addr) const EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex) |
|
std::vector< AddedNodeInfo > | GetAddedNodeInfo (bool include_connected) const EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex) |
|
bool | AddConnection (const std::string &address, ConnectionType conn_type, bool use_v2transport) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex) |
| Attempts to open a connection. More...
|
|
size_t | GetNodeCount (ConnectionDirection) const |
|
std::map< CNetAddr, LocalServiceInfo > | getNetLocalAddresses () const |
|
uint32_t | GetMappedAS (const CNetAddr &addr) const |
|
void | GetNodeStats (std::vector< CNodeStats > &vstats) const |
|
bool | DisconnectNode (const std::string &node) |
|
bool | DisconnectNode (const CSubNet &subnet) |
|
bool | DisconnectNode (const CNetAddr &addr) |
|
bool | DisconnectNode (NodeId id) |
|
ServiceFlags | GetLocalServices () const |
| Used to convey which local services we are offering peers during node connection. More...
|
|
void | AddLocalServices (ServiceFlags services) |
| Updates the local services that this node advertises to other peers during connection handshake. More...
|
|
void | RemoveLocalServices (ServiceFlags services) |
|
uint64_t | GetMaxOutboundTarget () const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex) |
|
std::chrono::seconds | GetMaxOutboundTimeframe () const |
|
bool | OutboundTargetReached (bool historicalBlockServingLimit) const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex) |
| check if the outbound target is reached if param historicalBlockServingLimit is set true, the function will response true if the limit for serving historical blocks has been reached More...
|
|
uint64_t | GetOutboundTargetBytesLeft () const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex) |
| response the bytes left in the current max outbound cycle in case of no limit, it will always response 0 More...
|
|
std::chrono::seconds | GetMaxOutboundTimeLeftInCycle () const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex) |
|
uint64_t | GetTotalBytesRecv () const |
|
uint64_t | GetTotalBytesSent () const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex) |
|
CSipHasher | GetDeterministicRandomizer (uint64_t id) const |
| Get a unique deterministic randomizer. More...
|
|
void | WakeMessageHandler () EXCLUSIVE_LOCKS_REQUIRED(!mutexMsgProc) |
|
bool | ShouldRunInactivityChecks (const CNode &node, std::chrono::seconds now) const |
| Return true if we should disconnect the peer for failing an inactivity check. More...
|
|
bool | MultipleManualOrFullOutboundConns (Network net) const EXCLUSIVE_LOCKS_REQUIRED(m_nodes_mutex) |
|
Definition at line 34 of file net.h.