7#include <boost/redis/connection.hpp>
8#include <boost/redis/config.hpp>
9#include <boost/asio/co_spawn.hpp>
10#include <boost/asio/use_awaitable.hpp>
11#include <boost/asio/io_context.hpp>
14namespace net = boost::asio;
18#if defined(BOOST_ASIO_HAS_CO_AWAIT)
20extern net::awaitable<void> co_main(
config);
22auto main(
int argc,
char * argv[]) ->
int
33 net::co_spawn(ioc, std::move(co_main(cfg)), [](std::exception_ptr p) {
35 std::rethrow_exception(p);
39 }
catch (std::exception
const& e) {
40 std::cerr <<
"(main) " << e.what() << std::endl;
49 std::cout <<
"Requires coroutine support." << std::endl;
address addr
Address of the Redis server.
std::string port
Redis port.
std::string host
Redis host.
Configure parameters used by the connection classes.