Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | List of all members
ConnmanTestMsg Struct Reference

#include <net.h>

Inheritance diagram for ConnmanTestMsg:
[legend]
Collaboration diagram for ConnmanTestMsg:
[legend]

Public Member Functions

void SetPeerConnectTimeout (int64_t timeout)
 
void AddTestNode (CNode &node)
 
void ClearTestNodes ()
 
void ProcessMessagesOnce (CNode &node)
 
void NodeReceiveMsgBytes (CNode &node, Span< const uint8_t > msg_bytes, bool &complete) const
 
bool ReceiveMsgFrom (CNode &node, CSerializedNetMsg &ser_msg) const
 
 CConnman (uint64_t seed0, uint64_t seed1, AddrMan &addrman, bool network_active=true)
 
- Public Member Functions inherited from CConnman
void Init (const Options &connOptions)
 
 CConnman (uint64_t seed0, uint64_t seed1, AddrMan &addrman, bool network_active=true)
 
 ~CConnman ()
 
bool Start (CScheduler &scheduler, const Options &options)
 
void StopThreads ()
 
void StopNodes ()
 
void Stop ()
 
void Interrupt ()
 
bool GetNetworkActive () const
 
bool GetUseAddrmanOutgoing () const
 
void SetNetworkActive (bool active)
 
void OpenNetworkConnection (const CAddress &addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *strDest, ConnectionType conn_type)
 
bool CheckIncomingNonce (uint64_t nonce)
 
bool ForNode (NodeId id, std::function< bool(CNode *pnode)> func)
 
void PushMessage (CNode *pnode, CSerializedNetMsg &&msg)
 
void ForEachNode (const NodeFn &func)
 
void ForEachNode (const NodeFn &func) const
 
std::vector< CAddressGetAddresses (size_t max_addresses, size_t max_pct, std::optional< Network > network) const
 Return all or many randomly selected addresses, optionally by network. More...
 
std::vector< CAddressGetAddresses (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 GetExtraFullOutboundCount () const
 
int GetExtraBlockRelayCount () const
 
bool AddNode (const std::string &node)
 
bool RemoveAddedNode (const std::string &node)
 
std::vector< AddedNodeInfoGetAddedNodeInfo () const
 
bool AddConnection (const std::string &address, ConnectionType conn_type)
 Attempts to open a connection. More...
 
size_t GetNodeCount (ConnectionDirection) 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...
 
uint64_t GetMaxOutboundTarget () const
 
std::chrono::seconds GetMaxOutboundTimeframe () const
 
bool OutboundTargetReached (bool historicalBlockServingLimit) const
 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
 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
 returns the time left in the current max outbound cycle in case of no limit, it will always return 0 More...
 
uint64_t GetTotalBytesRecv () const
 
uint64_t GetTotalBytesSent () const
 
CSipHasher GetDeterministicRandomizer (uint64_t id) const
 Get a unique deterministic randomizer. More...
 
unsigned int GetReceiveFloodSize () const
 
void WakeMessageHandler ()
 
std::chrono::microseconds PoissonNextSendInbound (std::chrono::microseconds now, std::chrono::seconds average_interval)
 Attempts to obfuscate tx time through exponentially distributed emitting. More...
 
bool ShouldRunInactivityChecks (const CNode &node, int64_t secs_now) const
 Return true if we should disconnect the peer for failing an inactivity check. More...
 

Additional Inherited Members

- Public Types inherited from CConnman
using NodeFn = std::function< void(CNode *)>
 

Detailed Description

Definition at line 18 of file net.h.

Member Function Documentation

◆ AddTestNode()

void ConnmanTestMsg::AddTestNode ( CNode node)
inline

Definition at line 26 of file net.h.

Here is the caller graph for this function:

◆ CConnman()

CConnman::CConnman

Definition at line 2464 of file net.cpp.

◆ ClearTestNodes()

void ConnmanTestMsg::ClearTestNodes ( )
inline

Definition at line 31 of file net.h.

◆ NodeReceiveMsgBytes()

void ConnmanTestMsg::NodeReceiveMsgBytes ( CNode node,
Span< const uint8_t >  msg_bytes,
bool &  complete 
) const

Definition at line 13 of file net.cpp.

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

◆ ProcessMessagesOnce()

void ConnmanTestMsg::ProcessMessagesOnce ( CNode node)
inline

Definition at line 40 of file net.h.

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

◆ ReceiveMsgFrom()

bool ConnmanTestMsg::ReceiveMsgFrom ( CNode node,
CSerializedNetMsg ser_msg 
) const

Definition at line 33 of file net.cpp.

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

◆ SetPeerConnectTimeout()

void ConnmanTestMsg::SetPeerConnectTimeout ( int64_t  timeout)
inline

Definition at line 21 of file net.h.


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