Open a new P2P connection and initialize it with the PeerManager at m_msgproc.
Declared in <net.h>
[[requires_capability(0x7fd74b3b63d8, 0x7fd74b3b6498), requires_capability(0x7fd74af17048, 0x7fd74af17108), requires_capability(0x7fd7574ebcf8, 0x7fd7574ebdb8), requires_capability(0x7fd74f4a70d8, 0x7fd74f4a7198), requires_capability(0x7fd75f8713c8, 0x7fd75f871488), requires_capability(0x7fd75930e248, 0x7fd75930e308), requires_capability(0x7fd753e5ff88, 0x7fd753e60048), requires_capability(0x7fd74d88f5f8, 0x7fd74d88f6b8), requires_capability(0x7fd755d43288, 0x7fd755d43348), requires_capability(0x7fd7598a3198, 0x7fd7598a3258), requires_capability(0x7fd74c8f59b8, 0x7fd74c8f5a78)]]
bool
OpenNetworkConnection(
CAddress const& addrConnect,
bool fCountFailure,
CountingSemaphoreGrant<>&& grant_outbound,
char const* pszDest,
ConnectionType conn_type,
bool use_v2transport,
std::optional<Proxy> const& proxy_override);
whether the connection was opened successfully.
| Name | Description |
|---|---|
| addrConnect [in] | Address to connect to, if pszDest is nullptr. |
| fCountFailure [in] | Increment the number of connection attempts to this address in Addrman. |
| grant_outbound [in] | Take ownership of this grant, to be released later when the connection is closed. |
| pszDest [in] | Address to resolve and connect to. |
| conn_type [in] | Type of the connection to open, must not be ConnectionType::INBOUND. |
| use_v2transport [in] | Use P2P encryption, (aka V2 transport, BIP324). |
| proxy_override [in] | Optional proxy to use and override normal proxy selection. |