RESTinio
Loading...
Searching...
No Matches
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/buffers.hpp>
15
16namespace restinio
17{
18
19namespace impl
20{
21
22//
23// connection_base_t
24//
25
26//! HTTP connection base.
29{
30 public:
34
35 //! Write parts for specified request.
36 virtual void
38 //! Request id.
39 request_id_t request_id,
40 //! Resp output flag.
41 response_output_flags_t response_output_flags,
42 //! Part of the response data.
43 write_group_t wg ) = 0;
44};
45
46//! Alias for http connection handle.
47using connection_handle_t = std::shared_ptr< connection_base_t >;
48
49} /* namespace impl */
50
51} /* namespace restinio */
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.
Group of writable items transported to the context of underlying connection as one solid piece.
Definition buffers.hpp:727
std::shared_ptr< connection_base_t > connection_handle_t
Alias for http connection handle.
unsigned int request_id_t
Request id in scope of single connection.
std::uint64_t connection_id_t
Type for ID of connection.
Response output flags for buffers commited to response-coordinator.