diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-07-13 06:40:25 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-07-13 06:40:25 +0300 |
commit | 6a7046891d4ecca4bd4aa5808bc31eb306eab22a (patch) | |
tree | 6e650ebd7beac18b3f1d0b45381a3998d3b59f78 /server/src | |
parent | 3acb88de959f7b88f6dd883144e936f0c4dedc25 (diff) |
изменено: protocol/udm.proto
изменено: server/src/main.cpp
изменено: server/udm-server.cbp
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/main.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/server/src/main.cpp b/server/src/main.cpp index 13b291b..7274da0 100644 --- a/server/src/main.cpp +++ b/server/src/main.cpp @@ -19,11 +19,13 @@ */ #include <boost/program_options.hpp> #include <boost/filesystem.hpp> +#include <boost/asio.hpp> #include <iostream> #include "api_module_metadata_storage.h" #include "modules_handler.h" #include "utilities.h" +#include "server.h" #include "main.h" @@ -37,6 +39,9 @@ namespace bpo = boost::program_options; runtime_config_s runtime_config; + +server *serv = nullptr; + //TODO: "core" config section architecture, define base settings @@ -155,6 +160,26 @@ int main(int argc, char *argv[]) { //TODO: fork here } + boost::asio::io_service io_service_server; + try{ + serv = new server(io_service_server, 6613); + } + catch(std::exception &e) + { + //TODO: + } + catch(...) + { + //TODO: + } + boost::system::error_code ec; + io_service_server.run(ec); + if(ec) + { + //TODO: + } + + //TODO: run here return 0; //stub for now } |