stefanocasazza / ULib

C++ application development framework, to help developers create and deploy applications quickly and simply
GNU Lesser General Public License v3.0
947 stars 107 forks source link

No sample config for simple_client_server #10

Closed vird closed 9 years ago

vird commented 9 years ago

simple_client_server # ./server server: ERROR: 10/06/15 15:07:57 (pid 22751) argument 'file_config' not specified - Exiting... no config provided and I can't understand what config format required Those both are not valid config.ini ENABLE_IPV6 0 MSG_WELCOME welcome SERVER_ADDRESS 127.0.0.1

ENABLE_IPV6=0 MSG_WELCOME=welcome SERVER_ADDRESS=127.0.0.1

./server config.ini server: ERROR: 10/06/15 15:11:21 (pid 22772) config file 'config.ini' not valid - Exiting...

stefanocasazza commented 9 years ago

Hi,

simple_client_server is a very old code that don't represent very much the latest userver, anyway there is the test for this example in the directory tests/examples: client_server.test If you look in this script you can see that it is needed a regular userver config file plus a particular section (a vector): userver { .... }

valid request and response

[ ... ]

The relative code is from line 122 of server.cpp: // load config file section REQUEST_AND_RESPONSE request_response = U_NEW(UVector); if (cfg.loadVector(*request_response) == false) U_ERROR("config file '%s' not valid", cfg.getPath().data());

Greetings

2015-06-10 14:11 GMT+02:00 vird notifications@github.com:

simple_client_server # ./server server: ERROR: 10/06/15 15:07:57 (pid 22751) argument 'file_config' not specified - Exiting... no config provided and I can't understand what config format required Those both are not valid config.ini ENABLE_IPV6 0 MSG_WELCOME welcome SERVER_ADDRESS 127.0.0.1

ENABLE_IPV6=0 MSG_WELCOME=welcome SERVER_ADDRESS=127.0.0.1

./server config.ini server: ERROR: 10/06/15 15:11:21 (pid 22772) config file 'config.ini' not valid - Exiting...

— Reply to this email directly or view it on GitHub https://github.com/stefanocasazza/ULib/issues/10.