Changeset 19233 for trunk


Ignore:
Timestamp:
10/03/18 20:33:22 (6 years ago)
Author:
tbretz
Message:
Adapted to allow to set port as in Main.h
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/chatclient.cc

    r14009 r19233  
    3232    config.add_options()
    3333        ("dns",       var<string>("localhost"),       "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
     34        ("port",      var<uint16_t>(DNS_PORT),        "Port to connect to dim nameserver.")
    3435        ("host",      var<string>(""),                "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
    3536        ("log,l",     var<string>(n), "Write log-file")
     
    3839
    3940    conf.AddEnv("dns",  "DIM_DNS_NODE");
     41    conf.AddEnv("port", "DIM_DNS_PORT");
    4042    conf.AddEnv("host", "DIM_HOST_NODE");
    4143
     
    8284        return 127;
    8385
    84     Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"));
     86    Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"), conf.Get<uint16_t>("port"));
    8587
    8688    if (conf.Get<int>("console")==0)
  • trunk/FACT++/src/chatserv.cc

    r16780 r19233  
    1717    config.add_options()
    1818        ("dns",       var<string>("localhost"),       "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
     19        ("port",      var<uint16_t>(DNS_PORT),        "Port to connect to dim nameserver.")
    1920        ("host",      var<string>(""),                "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
    2021        ("log,l",     var<string>(n), "Write log-file")
     
    2223
    2324    conf.AddEnv("dns",  "DIM_DNS_NODE");
     25    conf.AddEnv("port", "DIM_DNS_PORT");
    2426    conf.AddEnv("host", "DIM_HOST_NODE");
    2527
     
    8284        return 127;
    8385
    84     Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"));
     86    Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"), conf.Get<uint16_t>("port"));
    8587
    8688    WindowLog log;
Note: See TracChangeset for help on using the changeset viewer.