mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 02:50:33 +00:00
httpd: allow switching network stack
This commit is contained in:
@@ -292,7 +292,23 @@ public:
|
||||
|
||||
int main(int ac, char** av) {
|
||||
http_server server;
|
||||
server.listen({{}, 10000});
|
||||
namespace bpo = boost::program_options;
|
||||
bpo::options_description opts;
|
||||
opts.add_options()
|
||||
("help", "show help message")
|
||||
;
|
||||
opts.add(reactor::get_options_description());
|
||||
bpo::variables_map configuration;
|
||||
bpo::store(bpo::command_line_parser(ac, av).options(opts).run(), configuration);
|
||||
bpo::notify(configuration);
|
||||
if (configuration.count("help")) {
|
||||
std::cout << opts << "\n";
|
||||
return 1;
|
||||
}
|
||||
the_reactor.configure(configuration);
|
||||
the_reactor.start().then([&server] {
|
||||
server.listen({{}, 10000});
|
||||
});
|
||||
the_reactor.run();
|
||||
return 0;
|
||||
}
|
||||
|
||||
4
build.mk
4
build.mk
@@ -39,12 +39,14 @@ all: apps/seastar/seastar $(tests) apps/httpd/httpd
|
||||
clean:
|
||||
rm seastar $(tests) *.o
|
||||
|
||||
libnet = net/virtio.o net/net.o net/ip.o net/ethernet.o net/arp.o net/stack.o
|
||||
|
||||
apps/seastar/seastar: apps/seastar/main.o core/reactor.o
|
||||
$(link)
|
||||
|
||||
tests/test-reactor: tests/test-reactor.o core/reactor.o
|
||||
|
||||
apps/httpd/httpd: apps/httpd/httpd.o core/reactor.o
|
||||
apps/httpd/httpd: apps/httpd/httpd.o core/reactor.o $(libnet)
|
||||
|
||||
tests/fileiotest: tests/fileiotest.o core/reactor.o
|
||||
|
||||
|
||||
Reference in New Issue
Block a user