GCC Code Coverage Report


Directory: libs/beast2/
File: include/boost/beast2/server/http_server.hpp
Date: 2025-11-13 15:50:44
Exec Total Coverage
Lines: 0 2 0.0%
Functions: 0 2 0.0%
Branches: 0 0 -%

Line Branch Exec Source
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_HTTP_SERVER_HPP
11 #define BOOST_BEAST2_SERVER_HTTP_SERVER_HPP
12
13 #include <boost/beast2/detail/config.hpp>
14 #include <boost/beast2/server/router_asio.hpp>
15 #include <boost/asio/any_io_executor.hpp>
16 #include <boost/asio/ip/tcp.hpp>
17
18 namespace boost {
19 namespace beast2 {
20
21 class application;
22
23 template<class Stream>
24 class http_server
25 {
26 public:
27 ~http_server() = default;
28
29 http_server() = default;
30
31 router_asio<Stream> wwwroot;
32
33 /** Run the server
34
35 This function attaches the current thread to I/O context
36 so that it may be used for executing submitted function
37 objects. Blocks the calling thread until the part is stopped
38 and has no outstanding work.
39 */
40 virtual void attach() = 0;
41 };
42
43 //------------------------------------------------
44
45 BOOST_BEAST2_DECL
46 auto
47 install_plain_http_server(
48 application& app,
49 char const* addr,
50 unsigned short port,
51 std::size_t num_workers) ->
52 http_server<asio::basic_stream_socket<
53 asio::ip::tcp,
54 asio::io_context::executor_type>>&;
55
56 } // beast2
57 } // boost
58
59 #endif
60