MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ToStringAddrPort

Method ToStringAddrPort

src/netaddress.cpp:903–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

901}
902
903std::string CService::ToStringAddrPort() const
904{
905 const auto port_str = strprintf("%u", port);
906
907 if (IsIPv4() || IsTor() || IsI2P() || IsInternal()) {
908 return ToStringAddr() + ":" + port_str;
909 } else {
910 return "[" + ToStringAddr() + "]:" + port_str;
911 }
912}
913
914CSubNet::CSubNet():
915 valid(false)

Callers 15

ConnectMethod · 0.80
BindAndStartListeningMethod · 0.80
NewSockAcceptedMethod · 0.80
InitHTTPServerFunction · 0.80
HTTPReq_JSONRPCFunction · 0.80
HTTPRemoteClientMethod · 0.80
get_socks_cbMethod · 0.80
add_onion_cbMethod · 0.80
auth_cbMethod · 0.80
PushNodeVersionMethod · 0.80

Calls 3

IsIPv4Function · 0.85
IsTorFunction · 0.85
IsI2PFunction · 0.85

Tested by 7

BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
BOOST_FIXTURE_TEST_CASEFunction · 0.64
TestParseFunction · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64