Attempts to open a connection. Currently only used from tests.
Synopsis
Declared in <net.h>
[[requires_capability(0x7ff36f781f70, 0x7ff36f782030), requires_capability(0x7ff36f4687e0, 0x7ff36f4688a0), requires_capability(0x7ff37f407da0, 0x7ff37f407e60), requires_capability(0x7ff377564b70, 0x7ff377564c30), requires_capability(0x7ff37b6a0070, 0x7ff37b6a0130), requires_capability(0x7ff37e1c7ca0, 0x7ff37e1c7d60), requires_capability(0x7ff379a7e1f0, 0x7ff379a7e2b0), requires_capability(0x7ff36f4a5230, 0x7ff36f4a52f0), requires_capability(0x7ff37bc15e90, 0x7ff37bc15f50), requires_capability(0x7ff3814a5e60, 0x7ff3814a5f20), requires_capability(0x7ff3666ccee0, 0x7ff3666ccfa0)]]
bool
AddConnection(
std::string const& address,
ConnectionType conn_type,
bool use_v2transport);
Return Value
bool Returns false if there are no available slots for this connection: ‐ conn_type not a supported ConnectionType ‐ Max total outbound connection capacity filled ‐ Max connection capacity for type is filled
Parameters
Name |
Description |
address [in] |
Address of node to try connecting to |
conn_type [in] |
ConnectionType::OUTBOUND, ConnectionType::BLOCK_RELAY, ConnectionType::ADDR_FETCH or ConnectionType::FEELER |
use_v2transport [in] |
Set to true if node attempts to connect using BIP 324 v2 transport protocol. |
Created with MrDocs