MPD: TimeoutMonitor Class Reference

MPD 0.20.18

Public Member Functions | Protected Member Functions | Friends
TimeoutMonitor Class Referenceabstract

This class monitors a timeout. More...

`#include <TimeoutMonitor.hxx>`

Inheritance diagram for TimeoutMonitor:
[legend]

## Public Member Functions
| TimeoutMonitor (EventLoop &_loop)
| ~TimeoutMonitor ()
EventLoop & | GetEventLoop ()
bool | IsActive () const
void | Schedule (std::chrono::steady_clock::duration d)
void | Cancel ()

## Protected Member Functions
virtual void | OnTimeout ()=0

## Friends
class | EventLoop

## Detailed Description

This class monitors a timeout.

Use Schedule() to begin the timeout or Cancel() to cancel it.

This class is not thread-safe, all methods must be called from the thread that runs the EventLoop, except where explicitly documented as thread-safe.

Definition at line 37 of file TimeoutMonitor.hxx.

## Constructor & Destructor Documentation

## ◆ TimeoutMonitor()

TimeoutMonitor::TimeoutMonitor | ( | EventLoop & | _loop | ) |
| inline

Definition at line 45 of file TimeoutMonitor.hxx.

## ◆ ~TimeoutMonitor()

TimeoutMonitor::~TimeoutMonitor | ( |  | ) |
| inline

Definition at line 49 of file TimeoutMonitor.hxx.

## Member Function Documentation

## ◆ Cancel()

void TimeoutMonitor::Cancel | ( |  | ) |

## ◆ GetEventLoop()

EventLoop& TimeoutMonitor::GetEventLoop | ( |  | ) |
| inline

Definition at line 53 of file TimeoutMonitor.hxx.

## ◆ IsActive()

bool TimeoutMonitor::IsActive | ( |  | ) | const
| inline

Definition at line 57 of file TimeoutMonitor.hxx.

## ◆ OnTimeout()

virtual void TimeoutMonitor::OnTimeout | ( |  | ) |
| protectedpure virtual

## ◆ Schedule()

void TimeoutMonitor::Schedule | ( | std::chrono::steady_clock::duration | d | ) |

## Friends And Related Function Documentation

## ◆ EventLoop

friend class EventLoop
| friend

Definition at line 38 of file TimeoutMonitor.hxx.

The documentation for this class was generated from the following file:

- event/TimeoutMonitor.hxx