Skip to content

Commit b44fffd

Browse files
committed
Adding more support functions.
1 parent 45734df commit b44fffd

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

boost/network/support/is_http.hpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#ifndef BOOST_NETWORK_SUPPORT_IS_HTTP_HPP_20100622
2+
#define BOOST_NETWORK_SUPPORT_IS_HTTP_HPP_20100622
3+
4+
// Copyright 2010 (c) 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/tags.hpp>
10+
#include <boost/type_traits/is_base_of.hpp>
11+
#include <boost/network/support/is_udp.hpp>
12+
#include <boost/static_assert.hpp>
13+
14+
namespace boost { namespace network {
15+
16+
template <class Tag>
17+
struct is_http :
18+
is_base_of<
19+
tags::http,
20+
Tag
21+
>
22+
{};
23+
24+
} // namespace network
25+
26+
} // namespace boost
27+
28+
#endif // BOOST_NETWORK_SUPPORT_IS_HTTP_HPP_20100622

boost/network/support/is_tcp.hpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifndef BOOST_NETWORK_SUPPORT_IS_TCP_HPP_20100622
2+
#define BOOST_NETWORK_SUPPORT_IS_TCP_HPP_20100622
3+
4+
// Copyright 2010 (c) 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/tags.hpp>
10+
#include <boost/type_traits/is_base_of.hpp>
11+
12+
namespace boost { namespace network {
13+
14+
template <class Tag>
15+
struct is_tcp :
16+
is_base_of<
17+
tags::tcp,
18+
Tag
19+
>
20+
{};
21+
22+
} // namespace network
23+
24+
} // namespace boost
25+
26+
#endif // BOOST_NETWORK_SUPPORT_IS_TCP_HPP_20100622

boost/network/support/is_udp.hpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#ifndef BOOST_NETWORK_SUPPORT_IS_UDP_HPP_20100622
2+
#define BOOST_NETWORK_SUPPORT_IS_UDP_HPP_20100622
3+
4+
// Copyright 2010 (c) 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/tags.hpp>
10+
#include <boost/type_traits/is_base_of.hpp>
11+
#include <boost/network/support/is_tcp.hpp>
12+
13+
namespace boost { namespace network {
14+
15+
template <class Tag>
16+
struct is_udp :
17+
is_base_of<
18+
tags::udp,
19+
Tag
20+
>
21+
{};
22+
23+
} // namespace network
24+
25+
} // namespace boost
26+
27+
#endif // BOOST_NETWORK_SUPPORT_IS_UDP_HPP_20100622

0 commit comments

Comments
 (0)