src/relpipe-tr-httpd.cpp
branchv_0
changeset 2 4b05b16b97e6
parent 1 23c516259cc5
child 4 37a86904145c
equal deleted inserted replaced
1:23c516259cc5 2:4b05b16b97e6
    49 	try {
    49 	try {
    50 		CLIParser cliParser;
    50 		CLIParser cliParser;
    51 		Configuration configuration = cliParser.parse(cli.arguments());
    51 		Configuration configuration = cliParser.parse(cli.arguments());
    52 		std::shared_ptr<RelationalWriter> writer(relpipe::writer::Factory::create(std::cout));
    52 		std::shared_ptr<RelationalWriter> writer(relpipe::writer::Factory::create(std::cout));
    53 		std::shared_ptr<RelationalReader> reader(relpipe::reader::Factory::create(std::cin));
    53 		std::shared_ptr<RelationalReader> reader(relpipe::reader::Factory::create(std::cin));
    54 		std::shared_ptr<HTTPServer> httpServer(HTTPServer::create());
    54 		HTTPServer::Options serverOptions;
       
    55 		serverOptions.tcpPort = configuration.tcpPort;
       
    56 		std::shared_ptr<HTTPServer> httpServer(HTTPServer::create(serverOptions));
    55 		HttpdHandler handler(writer, configuration, httpServer);
    57 		HttpdHandler handler(writer, configuration, httpServer);
    56 		reader->addHandler(&handler);
    58 		reader->addHandler(&handler);
    57 		reader->process();
    59 		reader->process();
    58 
    60 
    59 		resultCode = CLI::EXIT_CODE_SUCCESS;
    61 		resultCode = CLI::EXIT_CODE_SUCCESS;