Cnxn Mgr
The CnxnMgr handles discovery, connection, and maintenance of all connections into the Peer-2-Peer network. This allows higher layers to treat peers as a grab bag of nodes, ignoring issues like reconnecting, periodically cycling connections, and searching for new nodes.
Inheritors
Properties
If the connection state changes, this function will be called
Get the current list of electrum protocol connections It is better to use the connection getter functions, rather than accessing this list. This is meant for display, health and statistics, rather than access
Add a callback to handle incoming transactions
Functions
Add a potential node into the list of possible connections. If inIpp resolves to multiple addresses, a random one is chosen
Add a potential node into the list of possible connections
Add a callback to handle incoming blocks -- downcast the parameter to either BCHBlock or MerkleBlock
Add a callback to handle incoming block headers
Add a callback to handle incoming inventory (right now, only blocks, the CnxnMgr auto-handles tx INVs)
Add a callback to handle incoming incomplete MerkleBlocks
Add a callback to handle incoming transactions
clear all bans (if param is null) or clear any ban of the specified IP address
Returns true if we are connected to this node/port
Exclusively connect to a single node. All other existing connections will be dropped
Returns a random connection from the connection manager's node set, but not one of these. Returns null if no connections left
Returns a random connection from the connection manager's node set, but not one of these. @returns null if no connections left
Retrieves an electrum connection. Give it back with @ref returnElectrum()
Returns a list of results of your function applied to each connection in this list. Return null to not include this connection in the list. Note that the underlying data structure is synchronized so your function is called with this lock taken
report a node as having a problem
Prefer a particular node. An existing connections may be dropped to make room
Returns an electrum connection. DO NOT USE AFTER RETURNING
Send a transaction to one node
Broadcast a set of transactions to the network, returns true if transactions were sent (otherwise no nodes are available).
tell all nodes, including future connections, that we are only interested in things that match this bloom filter. To enable multiple wallets to use the same Blockchain, do NOT use this API directly. Instead use the blockchain API