| 43 | } |
| 44 | |
| 45 | void getHostAndPort(const Poco::URI & uri, std::vector<std::vector<std::string>> & hosts_and_ports_arguments) |
| 46 | { |
| 47 | std::vector<std::string> host_and_port; |
| 48 | const std::string & host = uri.getHost(); |
| 49 | if (!host.empty()) |
| 50 | { |
| 51 | host_and_port.push_back("--host=" + uriDecode(host, false)); |
| 52 | } |
| 53 | |
| 54 | // Port can be written without host (":9000"). Empty host name equals to default host. |
| 55 | auto port = uri.getPort(); |
| 56 | if (port != 0) |
| 57 | host_and_port.push_back("--port=" + std::to_string(port)); |
| 58 | |
| 59 | if (!host_and_port.empty()) |
| 60 | hosts_and_ports_arguments.push_back(std::move(host_and_port)); |
| 61 | } |
| 62 | |
| 63 | void buildConnectionString( |
| 64 | std::string_view host_and_port, |