| 901 | } |
| 902 | |
| 903 | std::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 | |
| 914 | CSubNet::CSubNet(): |
| 915 | valid(false) |