RESTinio

connection_base.hpp
Go to the documentation of this file.
1/*
2 restinio
3*/
4
9#pragma once
10
11#include <memory>
12
13#include <restinio/tcp_connection_ctx_base.hpp>
14#include <restinio/buffers.hpp>
15
16 namespace restinio
17{
18
19 namespace impl
20{
21
22//
23// connection_base_t
24//
25
27 class connection_base_t
28 : public tcp_connection_ctx_base_t
29{
30 public:
31 connection_base_t(connection_id_t id )
32 : tcp_connection_ctx_base_t{ id }
33 {}
34
36 virtual void
37 write_response_parts(
39 request_id_t request_id,
41 response_output_flags_t response_output_flags,
43 write_group_t wg ) = 0;
44};
45
47 using connection_handle_t = std::shared_ptr< connection_base_t >;
48
49} /* namespace impl */
50
51} /* namespace restinio */
buffers.hpp
restinio::impl::connection_base_t
HTTP connection base.
Definition: connection_base.hpp:29
restinio::impl::connection_base_t::connection_base_t
connection_base_t(connection_id_t id)
Definition: connection_base.hpp:31
restinio::impl::connection_base_t::write_response_parts
virtual void write_response_parts(request_id_t request_id, response_output_flags_t response_output_flags, write_group_t wg)=0
Write parts for specified request.
restinio::tcp_connection_ctx_base_t
TCP connection base.
Definition: tcp_connection_ctx_base.hpp:29
restinio::write_group_t
Group of writable items transported to the context of underlying connection as one solid piece.
Definition: buffers.hpp:692
restinio::impl::connection_handle_t
std::shared_ptr< connection_base_t > connection_handle_t
Alias for http connection handle.
Definition: connection_base.hpp:47
restinio
Definition: asio_include.hpp:21
restinio::request_id_t
unsigned int request_id_t
Request id in scope of single connection.
Definition: common_types.hpp:70
restinio::connection_id_t
std::uint64_t connection_id_t
Type for ID of connection.
Definition: common_types.hpp:174
restinio::response_output_flags_t
Response output flags for buffers commited to response-coordinator.
Definition: common_types.hpp:123
tcp_connection_ctx_base.hpp