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

Rc2 cleanup#622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
glynos merged 6 commits intocpp-netlib:masterfromdeanberris:rc2-cleanup
Mar 29, 2016
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,3 +13,4 @@ _build
build/
libs/network/doc/doxygen/
.DS_Store
*.swo
42 changes: 20 additions & 22 deletionsboost/network/protocol/http/server.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,37 +12,35 @@

#include <boost/network/protocol/http/response.hpp>
#include <boost/network/protocol/http/request.hpp>
#include <boost/network/protocol/http/server/sync_server.hpp>
#include <boost/network/protocol/http/server/async_server.hpp>

namespace boost {
namespace network {
namespace http {

template <class Tag, class Handler, class Enable = void>
struct server_base {
typedef unsupported_tag<Tag> type;
};

template <class Tag, class Handler>
struct server_base<Tag, Handler, typename enable_if<is_async<Tag> >::type> {
typedef async_server_base<Tag, Handler> type;
};

template <class Tag, class Handler>
struct server_base<Tag, Handler, typename enable_if<is_sync<Tag> >::type> {
typedef sync_server_base<Tag, Handler> type;
};

template <class Tag, class Handler>
struct basic_server : server_base<Tag, Handler>::type {};

/**
* The main HTTP Server template implementing an asynchronous HTTP service.
*
* Usage Example:
* \code{.cpp}
* handler_type handler;
* http_server::options options(handler);
* options.thread_pool(
* std::make_shared<boost::network::utils::thread_pool>());
* http_server server(options.address("localhost").port("8000"));
* \endcode
*
*/
template <class Handler>
struct server : server_base<tags::http_server, Handler>::type {
typedef typename server_base<tags::http_server, Handler>::type server_base;
struct server : async_server_base<tags::http_server, Handler> {
/// A convenience typedef for the base of this type, implementing most of
/// the internal details.
typedef async_server_base<tags::http_server, Handler> server_base;

/// The options supported by the server.
typedef server_options<tags::http_server, Handler> options;

explicit server(options const &options) :server_base(options) {}
using server_base::server_base;
};

} // namespace http
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp