IXWebSocket/ixwebsocket/IXCancellationRequest.h

19 lines
399 B
C
Raw Normal View History

2018-12-14 16:28:11 -08:00
/*
* IXCancellationRequest.h
* Author: Benjamin Sergeant
* Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
*/
#pragma once
2019-01-03 12:53:44 -08:00
#include <atomic>
2019-05-30 08:46:50 -07:00
#include <functional>
2018-12-14 16:28:11 -08:00
namespace ix
2018-12-14 16:28:11 -08:00
{
using CancellationRequest = std::function<bool()>;
2019-01-03 12:53:44 -08:00
2019-05-30 08:46:50 -07:00
CancellationRequest makeCancellationRequestWithTimeout(
int seconds, std::atomic<bool>& requestInitCancellation);
} // namespace ix