[DEV] try update the non socket interface

This commit is contained in:
Edouard DUPIN 2017-04-25 21:47:45 +02:00
parent 879cb30426
commit 2738f7d0e2
3 changed files with 19 additions and 10 deletions

View File

@ -22,6 +22,7 @@ namespace appl {
eproperty::Value<bool> propertyRouterNo; eproperty::Value<bool> propertyRouterNo;
eproperty::Value<std::string> propertyRouterIp; eproperty::Value<std::string> propertyRouterIp;
eproperty::Value<uint16_t> propertyRouterPort; eproperty::Value<uint16_t> propertyRouterPort;
eproperty::Value<bool> propertyServiceExtern;
eproperty::Value<std::string> propertyServiceIp; eproperty::Value<std::string> propertyServiceIp;
eproperty::Value<uint16_t> propertyServicePort; eproperty::Value<uint16_t> propertyServicePort;
eproperty::Value<uint16_t> propertyServiceMax; eproperty::Value<uint16_t> propertyServiceMax;

View File

@ -159,6 +159,12 @@ int main(int _argc, const char *_argv[]) {
} else { } else {
routerDisconnectionDelay = value; routerDisconnectionDelay = value;
} }
} else if (etk::start_with(data, "--service-extern=") == true) {
bool value = false;
if (data == "--service-extern=true") {
value = true;
}
basicGateway.propertyServiceExtern.set(value);
} else if (etk::start_with(data, "--service-ip=") == true) { } else if (etk::start_with(data, "--service-ip=") == true) {
basicGateway.propertyServiceIp.set(std::string(&data[13])); basicGateway.propertyServiceIp.set(std::string(&data[13]));
#ifdef GATEWAY_ENABLE_LAUNCHER #ifdef GATEWAY_ENABLE_LAUNCHER
@ -189,6 +195,7 @@ int main(int _argc, const char *_argv[]) {
APPL_PRINT(" --no-router Router connection disable ==> this enable the direct donnection of external client like on the router"); APPL_PRINT(" --no-router Router connection disable ==> this enable the direct donnection of external client like on the router");
APPL_PRINT(" --router-ip=XXX Router connection IP (default: " << basicGateway.propertyRouterIp.get() << ")"); APPL_PRINT(" --router-ip=XXX Router connection IP (default: " << basicGateway.propertyRouterIp.get() << ")");
APPL_PRINT(" --router-port=XXX Router connection PORT (default: " << basicGateway.propertyRouterPort.get() << ")"); APPL_PRINT(" --router-port=XXX Router connection PORT (default: " << basicGateway.propertyRouterPort.get() << ")");
APPL_PRINT(" --service-extern=frue/false Disable the external service connection ==> remove open port ...(default: " << basicGateway.propertyServiceExtern.get() << ")");
APPL_PRINT(" --service-ip=XXX Service connection IP (default: " << basicGateway.propertyServiceIp.get() << ")"); APPL_PRINT(" --service-ip=XXX Service connection IP (default: " << basicGateway.propertyServiceIp.get() << ")");
APPL_PRINT(" --service-port=XXX Service connection PORT (default: " << basicGateway.propertyServicePort.get() << ")"); APPL_PRINT(" --service-port=XXX Service connection PORT (default: " << basicGateway.propertyServicePort.get() << ")");
APPL_PRINT(" --service-max=XXX Service Maximum IO (default: " << basicGateway.propertyServiceMax.get() << ")"); APPL_PRINT(" --service-max=XXX Service Maximum IO (default: " << basicGateway.propertyServiceMax.get() << ")");

View File

@ -241,6 +241,7 @@ ememory::SharedPtr<appl::GateWayInterface> appl::Router::get(const std::string&
binary.c_str(), // must repeate the binary name to have the name as first argument ... binary.c_str(), // must repeate the binary name to have the name as first argument ...
userConf.c_str(), userConf.c_str(),
"--srv=all", "--srv=all",
"--service-extern=false",
delay.c_str(), delay.c_str(),
basePath.c_str(), basePath.c_str(),
logFile.c_str(), logFile.c_str(),