Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit32720b8

Browse files
committed
Merge pull request#622 from deanberris/rc2-cleanup
Rc2 cleanup
2 parents4fdd055 +de9194d commit32720b8

File tree

66 files changed

+1149
-6326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1149
-6326
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ _build
1313
build/
1414
libs/network/doc/doxygen/
1515
.DS_Store
16+
*.swo

‎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
namespaceboost {
1918
namespacenetwork {
2019
namespacehttp {
2120

22-
template<classTag,classHandler,classEnable =void>
23-
structserver_base {
24-
typedef unsupported_tag<Tag> type;
25-
};
26-
27-
template<classTag,classHandler>
28-
structserver_base<Tag, Handler,typename enable_if<is_async<Tag> >::type> {
29-
typedef async_server_base<Tag, Handler> type;
30-
};
31-
32-
template<classTag,classHandler>
33-
structserver_base<Tag, Handler,typename enable_if<is_sync<Tag> >::type> {
34-
typedef sync_server_base<Tag, Handler> type;
35-
};
36-
37-
template<classTag,classHandler>
38-
structbasic_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<classHandler>
41-
structserver : server_base<tags::http_server, Handler>::type {
42-
typedeftypename server_base<tags::http_server, Handler>::type server_base;
35+
structserver : 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-
explicitserver(optionsconst &options) :server_base(options) {}
43+
using server_base::server_base;
4644
};
4745

4846
}// namespace http

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp