Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/232#discussion_r112819443
  
    --- Diff: cli/Flags.cpp ---
    @@ -87,4 +87,25 @@ DEFINE_bool(preload_buffer_pool, false,
                 "accepting queries (should also set --buffer_pool_slots to be "
                 "large enough to accomodate the entire database).");
     
    +static bool ValidatePort(const char *flagname, std::int32_t value) {
    +  int const min = 0, max = 65536;
    +  if (value > min && value < max) {
    +    return true;
    +  }
    +  std::cout << "Invalid value for --" << flagname << ": " << value
    +            << "\nUse ports between " << min << " and "
    +            << max << std::endl;
    +  return false;
    +}
    +
    +DEFINE_int32(cli_network_port, 3000,
    +             "Listens for TCP connections on this port when network mode 
is enabled. "
    +             "This is only used if the cli is set to use the network mode 
(--mode=network).");
    +DEFINE_validator(cli_network_port, &ValidatePort);
    +
    +DEFINE_string(cli_network_ip, "localhost",
    --- End diff --
    
    Change to `0.0.0.0` from `localhost`, as the latter is hostname, not ip.
    
    Also, move these two new flags in `NetworkIO` file, as they are not used by 
any other files.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to