Mercurial > irccd
comparison irccdctl/cli.cpp @ 545:1ef194b6b168
Common: make network_stream template
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 22 Nov 2017 11:23:10 +0100 |
parents | 7051034bf2ee |
children | 24b79bccc181 |
comparison
equal
deleted
inserted
replaced
544:8d9662b2beee | 545:1ef194b6b168 |
---|---|
54 }); | 54 }); |
55 } | 55 } |
56 | 56 |
57 void cli::request(ctl::controller& ctl, nlohmann::json req, handler_t handler) | 57 void cli::request(ctl::controller& ctl, nlohmann::json req, handler_t handler) |
58 { | 58 { |
59 ctl.send(req, [&ctl, req, handler, this] (auto code, auto) { | 59 ctl.send(req, [&ctl, req, handler, this] (auto code) { |
60 if (code) | 60 if (code) |
61 throw boost::system::system_error(code); | 61 throw boost::system::system_error(code); |
62 | 62 |
63 recv_response(ctl, std::move(req), std::move(handler)); | 63 recv_response(ctl, std::move(req), std::move(handler)); |
64 }); | 64 }); |