19 lines
465 B
C++
19 lines
465 B
C++
|
#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;
|
||
|
};
|