xbot/watchdog_thread.hpp

19 lines
465 B
C++
Raw Normal View History

2023-11-25 09:22:55 -08:00
#pragma once
#include "thread.hpp"
#include <boost/asio/steady_timer.hpp>
class Connection;
class WatchdogThread : public Thread, public std::enable_shared_from_this<WatchdogThread>
{
Connection * connection_;
boost::asio::steady_timer timer_;
public:
WatchdogThread(Connection * connection) noexcept;
auto priority() const -> priority_type override;
auto on_event(Event const& event) -> std::pair<ThreadOutcome, EventOutcome> override;
};