File indexing completed on 2026-08-17 09:00:18
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_REDIS_RUN_FSM_HPP
0010 #define BOOST_REDIS_RUN_FSM_HPP
0011
0012 #include <boost/asio/cancellation_type.hpp>
0013 #include <boost/system/error_code.hpp>
0014
0015
0016
0017 namespace boost::redis::detail {
0018
0019
0020 struct connection_state;
0021
0022
0023 enum class run_action_type
0024 {
0025 done,
0026 immediate,
0027 connect,
0028 parallel_group,
0029 cancel_receive,
0030 wait_for_reconnection,
0031 };
0032
0033 struct run_action {
0034 run_action_type type;
0035 system::error_code ec;
0036
0037 run_action(run_action_type type) noexcept
0038 : type{type}
0039 { }
0040
0041 run_action(system::error_code ec) noexcept
0042 : type{run_action_type::done}
0043 , ec{ec}
0044 { }
0045 };
0046
0047 class run_fsm {
0048 int resume_point_{0};
0049 system::error_code stored_ec_;
0050
0051 public:
0052 run_fsm() = default;
0053
0054 run_action resume(
0055 connection_state& st,
0056 system::error_code ec,
0057 asio::cancellation_type_t cancel_state);
0058 };
0059
0060 }
0061
0062 #endif