| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- /* Copyright (c) 2018-2024 Marcelo Zimbres Silva (mzimbres@gmail.com)
- *
- * Distributed under the Boost Software License, Version 1.0. (See
- * accompanying file LICENSE.txt)
- */
- #include <boost/redis/request.hpp>
- #include <string_view>
- namespace boost::redis::detail {
- auto has_response(std::string_view cmd) -> bool
- {
- if (cmd == "SUBSCRIBE")
- return true;
- if (cmd == "PSUBSCRIBE")
- return true;
- if (cmd == "UNSUBSCRIBE")
- return true;
- if (cmd == "PUNSUBSCRIBE")
- return true;
- return false;
- }
- request make_hello_request()
- {
- request req;
- req.push("HELLO", "3");
- return req;
- }
- } // namespace boost::redis::detail
- void boost::redis::request::append(const request& other)
- {
- payload_ += other.payload_;
- commands_ += other.commands_;
- expected_responses_ += other.expected_responses_;
- }
|