Skip to content

Commit 65b1551

Browse files
committed
Update inline docs and remove stale docs
1 parent 3ceb0e3 commit 65b1551

19 files changed

+308
-1572
lines changed

boost/network/protocol/http/server.hpp

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,35 @@
1212

1313
#include <boost/network/protocol/http/response.hpp>
1414
#include <boost/network/protocol/http/request.hpp>
15-
#include <boost/network/protocol/http/server/sync_server.hpp>
1615
#include <boost/network/protocol/http/server/async_server.hpp>
1716

1817
namespace boost {
1918
namespace network {
2019
namespace http {
2120

22-
template <class Tag, class Handler, class Enable = void>
23-
struct server_base {
24-
typedef unsupported_tag<Tag> type;
25-
};
26-
27-
template <class Tag, class Handler>
28-
struct server_base<Tag, Handler, typename enable_if<is_async<Tag> >::type> {
29-
typedef async_server_base<Tag, Handler> type;
30-
};
31-
32-
template <class Tag, class Handler>
33-
struct server_base<Tag, Handler, typename enable_if<is_sync<Tag> >::type> {
34-
typedef sync_server_base<Tag, Handler> type;
35-
};
36-
37-
template <class Tag, class Handler>
38-
struct basic_server : server_base<Tag, Handler>::type {};
39-
21+
/**
22+
* The main HTTP Server template implementing an asynchronous HTTP service.
23+
*
24+
* Usage Example:
25+
* \code{.cpp}
26+
* handler_type handler;
27+
* http_server::options options(handler);
28+
* options.thread_pool(
29+
* std::make_shared<boost::network::utils::thread_pool>());
30+
* http_server server(options.address("localhost").port("8000"));
31+
* \endcode
32+
*
33+
*/
4034
template <class Handler>
41-
struct server : server_base<tags::http_server, Handler>::type {
42-
typedef typename server_base<tags::http_server, Handler>::type server_base;
35+
struct server : async_server_base<tags::http_server, Handler> {
36+
/// A convenience typedef for the base of this type, implementing most of
37+
/// the internal details.
38+
typedef async_server_base<tags::http_server, Handler> server_base;
39+
40+
/// The options supported by the server.
4341
typedef server_options<tags::http_server, Handler> options;
4442

45-
explicit server(options const &options) : server_base(options) {}
43+
using server_base::server_base;
4644
};
4745

4846
} // namespace http
Binary file not shown.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy