| 96 | } |
| 97 | |
| 98 | void Server::ProcessWhitelist(const std::string& whitelist) { |
| 99 | std::string input_copy = whitelist; |
| 100 | while (input_copy.size() > 0) { |
| 101 | size_t delimiter_pos = input_copy.find(","); |
| 102 | std::string token = input_copy.substr(0, delimiter_pos); |
| 103 | if (delimiter_pos == std::string::npos) { |
| 104 | input_copy = ""; |
| 105 | } else { |
| 106 | input_copy = input_copy.substr(delimiter_pos + 1); |
| 107 | } |
| 108 | this->whitelist_.push_back(token); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | std::string Server::GetListeningPorts(const bool use_ipv6) { |
| 113 | std::string port_format_string = "%s:%d"; |
no test coverage detected