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

Commita418cf4

Browse files
committed
Adding server tag and is_server trait.
1 parent1c2a85f commita418cf4

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#ifndef BOOST_NETWORK_PROTOCOL_SUPPORT_IS_SERVER_HPP_20101118
2+
#defineBOOST_NETWORK_PROTOCOL_SUPPORT_IS_SERVER_HPP_20101118
3+
4+
// Copyright 2010 Dean Michael Berris.
5+
// Distributed under the Boost Software License, Version 1.0.
6+
// (See accompanying file LICENSE_1_0.txt or copy at
7+
// http://www.boost.org/LICENSE_1_0.txt)
8+
9+
#include<boost/network/protocol/http/tags.hpp>
10+
#include<boost/type_traits/is_base_of.hpp>
11+
12+
namespaceboost {namespacenetwork {namespacehttp {
13+
14+
template<classTag>
15+
structis_server :
16+
is_base_of<
17+
tags::server,
18+
Tag
19+
>
20+
{};
21+
22+
}/* http*/
23+
24+
}/* network*/
25+
26+
}/* boost*/
27+
28+
#endif/* BOOST_NETWORK_PROTOCOL_SUPPORT_IS_SERVER_HPP_20101118*/

‎boost/network/protocol/http/tags.hpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace boost { namespace network { namespace http { namespace tags {
1313
structhttp {};
1414
structkeepalive {};
1515
structsimple {};
16+
structserver {};
1617

1718
usingnamespaceboost::network::tags;
1819

@@ -25,8 +26,8 @@ namespace boost { namespace network { namespace http { namespace tags {
2526
typedef mpl::vector<http, keepalive, sync, udp, default_string> http_keepalive_8bit_udp_resolve_tags;
2627
typedef mpl::vector<http, simple, async, udp, default_string> http_async_8bit_udp_resolve_tags;
2728
typedef mpl::vector<http, simple, async, tcp, default_string> http_async_8bit_tcp_resolve_tags;
28-
typedef mpl::vector<http, simple, sync, pod, default_string> http_server_tags;
29-
typedef mpl::vector<http, simple, async, pod, default_string> http_async_server_tags;
29+
typedef mpl::vector<http, simple, sync, pod, default_string, server> http_server_tags;
30+
typedef mpl::vector<http, simple, async, pod, default_string, server> http_async_server_tags;
3031

3132
BOOST_NETWORK_DEFINE_TAG(http_default_8bit_tcp_resolve);
3233
BOOST_NETWORK_DEFINE_TAG(http_default_8bit_udp_resolve);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp