NAP
nap
system_modules
napwebsocket
src
websocketconnection.h
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5
#pragma once
6
7
// Local Includes
8
#include "wspp.h"
9
10
// External Includes
11
#include <utility/dllexport.h>
12
13
namespace
nap
14
{
15
template
<
typename
T>
16
class
WebSocketServerEndPointSetup
;
17
template
<
typename
T>
18
class
WebSocketClientEndPointSetup
;
19
27
class
NAPAPI
WebSocketConnection
final
28
{
29
template
<
typename
T>
30
friend
class
WebSocketServerEndPointSetup
;
31
template
<
typename
T>
32
friend
class
WebSocketClientEndPointSetup
;
33
34
public
:
35
// Creates an invalid (expired) connection
36
WebSocketConnection
() =
default
;
37
// Default move constructor
38
WebSocketConnection
(
WebSocketConnection
&& other) =
default
;
39
// Default move assignment operator
40
WebSocketConnection
& operator=(
WebSocketConnection
&& other) =
default
;
41
// Default copy constructor
42
WebSocketConnection
(
const
WebSocketConnection
& other) =
default
;
43
// Default copy assignment operator
44
WebSocketConnection
& operator=(
const
WebSocketConnection
& other) =
default
;
45
46
private
:
51
WebSocketConnection
(
wspp::ConnectionHandle
connection);
52
53
wspp::ConnectionHandle
mConnection;
54
};
55
56
using
WebSocketConnectionPtr
= std::unique_ptr<WebSocketConnection>;
57
}
nap::WebSocketClientEndPointSetup
Definition:
websocketclientendpoint.h:39
nap::WebSocketConnection
Definition:
websocketconnection.h:27
nap::WebSocketConnectionPtr
std::unique_ptr< WebSocketConnection > WebSocketConnectionPtr
Definition:
websocketconnection.h:56
nap::WebSocketServerEndPointSetup
Definition:
websocketconnection.h:16
nap::wspp::ConnectionHandle
std::weak_ptr< void > ConnectionHandle
server / client connection
Definition:
wspp.h:18
nap
Definition:
templateapp.h:17
Generated by doxygen