Line data Source code
1 : //
2 : // Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com)
3 : //
4 : // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 : // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 : //
7 : // Official repository: https://github.com/cppalliance/beast2
8 : //
9 :
10 : #ifndef BOOST_BEAST2_SERVER_ROUTE_HANDLER_ASIO_HPP
11 : #define BOOST_BEAST2_SERVER_ROUTE_HANDLER_ASIO_HPP
12 :
13 : #include <boost/beast2/detail/config.hpp>
14 : #include <boost/beast2/server/route_handler.hpp>
15 : #include <type_traits>
16 :
17 : namespace boost {
18 : namespace beast2 {
19 :
20 : /** Response object for Asio HTTP route handlers
21 : */
22 : template<class AsyncStream>
23 : struct ResponseAsio : Response
24 : {
25 : using stream_type = typename std::decay<AsyncStream>::type;
26 :
27 : AsyncStream stream;
28 :
29 : template<class... Args>
30 : explicit
31 1 : ResponseAsio(
32 : Args&&... args)
33 1 : : stream(std::forward<Args>(args)...)
34 : {
35 1 : }
36 : };
37 :
38 : } // beast2
39 : } // boost
40 :
41 : #endif
|