| 63 | } |
| 64 | |
| 65 | std::string GetNetworkName(enum Network net) |
| 66 | { |
| 67 | switch (net) { |
| 68 | case NET_IPV4: |
| 69 | return "ipv4"; |
| 70 | case NET_IPV6: |
| 71 | return "ipv6"; |
| 72 | case NET_TOR: |
| 73 | return "onion"; |
| 74 | default: |
| 75 | return ""; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void SplitHostPort(std::string in, int& portOut, std::string& hostOut) |
| 80 | { |