RESTinio
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 
16 namespace restinio
17 {
18 
19 namespace impl
20 {
21 
22 //
23 // connection_base_t
24 //
25 
26 //! HTTP connection base.
29 {
30  public:
31  connection_base_t(connection_id_t id )
33  {}
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.
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.
std::enable_if< std::is_same< Parameter_Container, query_string_params_t >::value||std::is_same< Parameter_Container, router::route_params_t >::value, optional_t< Value_Type > >::type opt_value(const Parameter_Container &params, string_view_t key)
Gets the value of a parameter specified by key wrapped in optional_t<Value_Type> if parameter exists ...
Definition: value_or.hpp:64