RESTinio
Toggle main menu visibility
Loading...
Searching...
No Matches
restinio
websocket
impl
ws_connection_base.hpp
Go to the documentation of this file.
1
/*
2
restinio
3
*/
4
5
/*!
6
A base class for connection handle.
7
*/
8
9
#
pragma
once
10
11
#
include
<
memory
>
12
13
#
include
<
restinio
/
tcp_connection_ctx_base
.
hpp
>
14
#
include
<
restinio
/
common_types
.
hpp
>
15
#
include
<
restinio
/
buffers
.
hpp
>
16
17
namespace
restinio
18
{
19
20
namespace
websocket
21
{
22
23
namespace
basic
24
{
25
26
class
ws_t
;
27
using
ws_handle_t
= std::shared_ptr<
ws_t
>;
28
29
namespace
impl
30
{
31
32
//
33
// ws_connection_base_t
34
//
35
36
//! WebSocket connection base.
37
class
ws_connection_base_t
38
:
public
tcp_connection_ctx_base_t
39
{
40
public
:
41
ws_connection_base_t
(
connection_id_t
id )
42
:
tcp_connection_ctx_base_t
{
id
}
43
{}
44
45
//! Shutdown websocket.
46
virtual
void
47
shutdown
() = 0;
48
49
//! Kill websocket.
50
virtual
void
51
kill
() = 0;
52
53
//! Start reading ws-messages.
54
virtual
void
55
init_read
(
ws_handle_t
wsh ) = 0;
56
57
//! Write pieces of outgoing data.
58
virtual
void
59
write_data
(
60
write_group_t
wg,
61
bool
is_close_frame ) = 0;
62
};
63
64
//! Alias for WebSocket connection handle.
65
using
ws_connection_handle_t
= std::shared_ptr<
ws_connection_base_t
>;
66
67
}
/* namespace impl */
68
69
}
/* namespace basic */
70
71
}
/* namespace websocket */
72
73
}
/* namespace restinio */
restinio::tcp_connection_ctx_base_t
TCP connection base.
Definition
tcp_connection_ctx_base.hpp:29
restinio::tcp_connection_ctx_base_t::tcp_connection_ctx_base_t
tcp_connection_ctx_base_t(connection_id_t id)
Definition
tcp_connection_ctx_base.hpp:31
restinio::websocket::basic::impl::ws_connection_base_t
WebSocket connection base.
Definition
ws_connection_base.hpp:39
restinio::websocket::basic::impl::ws_connection_base_t::shutdown
virtual void shutdown()=0
Shutdown websocket.
restinio::websocket::basic::impl::ws_connection_base_t::init_read
virtual void init_read(ws_handle_t wsh)=0
Start reading ws-messages.
restinio::websocket::basic::impl::ws_connection_base_t::ws_connection_base_t
ws_connection_base_t(connection_id_t id)
Definition
ws_connection_base.hpp:41
restinio::websocket::basic::impl::ws_connection_base_t::kill
virtual void kill()=0
Kill websocket.
restinio::websocket::basic::impl::ws_connection_base_t::write_data
virtual void write_data(write_group_t wg, bool is_close_frame)=0
Write pieces of outgoing data.
restinio::websocket::basic::ws_t
A WebSocket bind.
Definition
websocket.hpp:40
restinio::write_group_t
Group of writable items transported to the context of underlying connection as one solid piece.
Definition
buffers.hpp:727
restinio::websocket::basic::impl
Definition
utf8.hpp:22
restinio::websocket::basic::impl::ws_connection_handle_t
std::shared_ptr< ws_connection_base_t > ws_connection_handle_t
Alias for WebSocket connection handle.
Definition
ws_connection_base.hpp:65
restinio::websocket::basic
Definition
utf8.hpp:19
restinio::websocket::basic::ws_handle_t
std::shared_ptr< ws_t > ws_handle_t
Alias for ws_t handle.
Definition
ws_connection_base.hpp:27
restinio::websocket
Definition
utf8.hpp:16
restinio
Definition
sendfile_operation_default.ipp:12
restinio::connection_id_t
std::uint64_t connection_id_t
Type for ID of connection.
Definition
common_types.hpp:174
Generated by
1.17.0