reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
TurnAsyncUdpSocket.hxx
Go to the documentation of this file.
1
#ifndef TURNASYNCUDPSOCKET_HXX
2
#define TURNASYNCUDPSOCKET_HXX
3
4
#include <asio.hpp>
5
#ifdef USE_SSL
6
#include <asio/ssl.hpp>
7
#endif
8
9
#include "
TurnAsyncSocket.hxx
"
10
#include "
reTurn/AsyncUdpSocketBase.hxx
"
11
12
namespace
reTurn
{
13
14
class
TurnAsyncUdpSocket
:
public
TurnAsyncSocket
,
public
AsyncUdpSocketBase
15
{
16
public
:
17
explicit
TurnAsyncUdpSocket
(asio::io_context&
ioService
,
18
TurnAsyncSocketHandler
*
turnAsyncSocketHandler
,
19
const
asio::ip::address& address,
20
unsigned
short
port);
21
22
virtual
unsigned
int
getSocketDescriptor
() {
return
(
unsigned
int
)
mSocket
.native_handle(); }
23
24
protected
:
25
26
private
:
27
// AsyncUdpSocketBase callbacks
28
virtual
void
onConnectSuccess();
29
virtual
void
onConnectFailure(
const
asio::error_code&
e
);
30
virtual
void
onReceiveSuccess(
const
asio::ip::address& address,
unsigned
short
port,
const
std::shared_ptr<DataBuffer>& data);
31
virtual
void
onReceiveFailure(
const
asio::error_code&
e
);
32
virtual
void
onSendSuccess();
33
virtual
void
onSendFailure(
const
asio::error_code&
e
);
34
};
35
36
}
37
38
#endif
39
40
41
/* ====================================================================
42
43
Copyright (c) 2007-2008, Plantronics, Inc.
44
Copyright (c) 2008-2018, SIP Spectrum, Inc.
45
All rights reserved.
46
47
Redistribution and use in source and binary forms, with or without
48
modification, are permitted provided that the following conditions are
49
met:
50
51
1. Redistributions of source code must retain the above copyright
52
notice, this list of conditions and the following disclaimer.
53
54
2. Redistributions in binary form must reproduce the above copyright
55
notice, this list of conditions and the following disclaimer in the
56
documentation and/or other materials provided with the distribution.
57
58
3. Neither the name of Plantronics nor the names of its contributors
59
may be used to endorse or promote products derived from this
60
software without specific prior written permission.
61
62
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
63
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
64
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
65
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
66
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
67
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
68
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
69
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
70
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
71
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
72
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
73
74
==================================================================== */
AsyncUdpSocketBase.hxx
TurnAsyncSocket.hxx
reTurn::AsyncUdpSocketBase
Definition
AsyncUdpSocketBase.hxx:14
reTurn::AsyncUdpSocketBase::mSocket
asio::ip::udp::socket mSocket
Definition
AsyncUdpSocketBase.hxx:32
reTurn::TurnAsyncSocketHandler
Definition
TurnAsyncSocketHandler.hxx:18
reTurn::TurnAsyncSocket
Definition
TurnAsyncSocket.hxx:42
reTurn::TurnAsyncUdpSocket
Definition
TurnAsyncUdpSocket.hxx:15
reTurn::TurnAsyncUdpSocket::getSocketDescriptor
virtual unsigned int getSocketDescriptor()
Definition
TurnAsyncUdpSocket.hxx:22
reTurn
Definition
AsyncSocketBase.cxx:16
list
void list()
Definition
userAdmin.cxx:66
reTurn
client
TurnAsyncUdpSocket.hxx
Generated by
1.9.8