| 56 | } |
| 57 | |
| 58 | std::string GetNetworkName(enum Network net) { |
| 59 | switch(net) |
| 60 | { |
| 61 | case NET_IPV4: return "ipv4"; |
| 62 | case NET_IPV6: return "ipv6"; |
| 63 | case NET_TOR: return "onion"; |
| 64 | default: return ""; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void SplitHostPort(std::string in, int &portOut, std::string &hostOut) { |
| 69 | size_t colon = in.find_last_of(':'); |