RESTinio
ws_connection_base.hpp
Go to the documentation of this file.
1/*
2 restinio
3*/
4
9#pragma once
10
11#include <memory>
12
15#include <restinio/buffers.hpp>
16
17namespace restinio
18{
19
20namespace websocket
21{
22
23namespace basic
24{
25
26class ws_t;
27using ws_handle_t = std::shared_ptr< ws_t >;
28
29namespace impl
30{
31
32//
33// ws_connection_base_t
34//
35
39{
40 public:
43 {}
44
46 virtual void
47 shutdown() = 0;
48
50 virtual void
51 kill() = 0;
52
54 virtual void
56
58 virtual void
61 bool is_close_frame ) = 0;
62};
63
65using 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 */
virtual void shutdown()=0
Shutdown websocket.
virtual void init_read(ws_handle_t wsh)=0
Start reading ws-messages.
virtual void write_data(write_group_t wg, bool is_close_frame)=0
Write pieces of outgoing data.
Group of writable items transported to the context of underlying connection as one solid piece.
Definition: buffers.hpp:692
std::shared_ptr< ws_connection_base_t > ws_connection_handle_t
Alias for WebSocket connection handle.
std::shared_ptr< ws_t > ws_handle_t
Alias for ws_t handle.
std::uint64_t connection_id_t
Type for ID of connection.