2
3
6
7
8
9
10
14#include <restinio/compiler_features.hpp>
15#include <restinio/common_types.hpp>
16#include <restinio/tls_fwd.hpp>
27
28
29
30
31
32
33
34
35
39
40
41
42
43
44
45
55
56
57
58
59
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93 template<
typename Lambda >
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129 template<
typename Lambda >
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170 template<
typename Lambda,
typename T >
176
177
178
179
180
181
182
188
189
190
191
192
193
194
195
196class upgraded_to_websocket_t
final
201
202
203
204
205
206
207
208
209using cause_t = std::variant< accepted_t, closed_t, upgraded_to_websocket_t >;
212
213
214
215
216
217
218
219
220
250
251
252
253
256 cause()
const noexcept {
return m_cause; }
260
261
262
263
264
265
266
267
268
269
accepted_t(tls_socket_t *tls_socket)
decltype(auto) inspect_tls_or_throw(Lambda &&lambda) const
Calls the specified lambda-function if the accepted connection is a TLS-connection.
T inspect_tls_or_default(Lambda &&lambda, T &&default_value) const
Calls the specified lambda-function if the accepted connection is a TLS-connection.
tls_socket_t * m_tls_socket
An optional pointer to TLS-related connection.
void try_inspect_tls(Lambda &&lambda) const
Calls the specified lambda-function if the accepted connection is a TLS-connection.
bool is_tls_connection() const noexcept
Checks if the accepted connection is a TLS-connection.
An object with info about connection to be passed to state listener.
endpoint_t remote_endpoint() const noexcept
Get the remote endpoint for the connection.
connection_id_t m_conn_id
endpoint_t m_remote_endpoint
connection_id_t connection_id() const noexcept
Get the connection id.
notice_t(connection_id_t conn_id, endpoint_t remote_endpoint, cause_t cause)
Initializing constructor.
cause_t cause() const noexcept
Get the cause for the notification.
std::variant< accepted_t, closed_t, upgraded_to_websocket_t > cause_t
A type for the representation of the current state of a connection.
asio_ns::ip::tcp::endpoint endpoint_t
An alias for endpoint type from Asio.
impl::tls_socket_t tls_socket_t
A public alias for the actual implementation of TLS-socket.
std::uint64_t connection_id_t
Type for ID of connection.
The default no-op state listener.