reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
FlowDtlsTimerContext.hxx
Go to the documentation of this file.
1
#if !defined(FlowDtlsTimerContext_hxx)
2
#define FlowDtlsTimerContext_hxx
3
4
// !slg! At least for builds in Visual Studio on windows this include needs to be above ASIO since inlined shared_from_this has
5
// a different linkage signature if included after - haven't investigated the full details as to exactly why this happens
6
#include <memory>
7
#include <mutex>
8
#include <set>
9
10
#include <asio.hpp>
11
#ifdef USE_SSL
12
#include <asio/ssl.hpp>
13
#endif
14
15
#include "
dtls_wrapper/DtlsTimer.hxx
"
16
23
namespace
flowmanager
24
{
25
26
class
FlowDtlsTimerContext
:
public
dtls::DtlsTimerContext
27
{
28
public
:
29
FlowDtlsTimerContext
(asio::io_context&
ioService
);
30
void
addTimer
(std::shared_ptr<dtls::DtlsTimer>
timer
,
unsigned
int
durationMs
)
override
;
31
32
// For shutdown: cancels the timers pending on the io thread, freeing them unfired, and
33
// ignores timers added from now on, so they don't keep the io_context running
34
void
stop
();
35
36
private
:
37
asio::io_context& mIOService;
38
std::mutex mMutex;
// addTimer is called from whichever thread uses the DtlsSocket
39
std::set<std::shared_ptr<asio::steady_timer>> mPending;
40
bool
mStopped;
41
};
42
43
}
44
45
#endif
46
47
/* ====================================================================
48
49
Copyright (c) 2008-2026, SIP Spectrum, Inc. http://sipspectrum.com
50
Copyright (c) 2007-2008, Plantronics, Inc.
51
All rights reserved.
52
53
Redistribution and use in source and binary forms, with or without
54
modification, are permitted provided that the following conditions are
55
met:
56
57
1. Redistributions of source code must retain the above copyright
58
notice, this list of conditions and the following disclaimer.
59
60
2. Redistributions in binary form must reproduce the above copyright
61
notice, this list of conditions and the following disclaimer in the
62
documentation and/or other materials provided with the distribution.
63
64
3. Neither the name of Plantronics nor the names of its contributors
65
may be used to endorse or promote products derived from this
66
software without specific prior written permission.
67
68
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
69
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
70
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
71
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
72
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
73
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
74
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
75
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
76
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
77
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
78
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79
80
==================================================================== */
DtlsTimer.hxx
dtls::DtlsTimerContext
Definition
DtlsTimer.hxx:45
flowmanager::FlowDtlsTimerContext
Definition
FlowDtlsTimerContext.hxx:27
flowmanager::FlowDtlsTimerContext::addTimer
void addTimer(std::shared_ptr< dtls::DtlsTimer > timer, unsigned int durationMs) override
Definition
FlowDtlsTimerContext.cxx:31
flowmanager::FlowDtlsTimerContext::stop
void stop()
Definition
FlowDtlsTimerContext.cxx:61
flowmanager
This class is used during media sessions that use Dtls-Srtp for a media transport.
Definition
ErrorCode.hxx:4
list
void list()
Definition
userAdmin.cxx:66
reflow
FlowDtlsTimerContext.hxx
Generated by
1.9.8