Skip to content

Commit 21f56c2

Browse files
committed
merged a bunch of changes from 0.8
2 parents fc8c153 + 96367d1 commit 21f56c2

File tree

116 files changed

+8252
-238
lines changed

Some content is hidden

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

116 files changed

+8252
-238
lines changed

boost/network/detail/wrapper_base.hpp

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,38 @@
77
#ifndef __NETWORK_DETAIL_WRAPPER_BASE_HPP__
88
#define __NETWORK_DETAIL_WRAPPER_BASE_HPP__
99

10-
namespace boost { namespace network { namespace detail {
10+
namespace boost { namespace network {
1111

1212
template <class Tag>
13-
struct wrapper_base {
14-
explicit wrapper_base(basic_message<Tag> & message_)
15-
: _message(message_)
16-
{};
13+
struct basic_message;
14+
15+
namespace detail {
1716

18-
protected:
19-
~wrapper_base() {}; // for extending only
17+
template <class Tag>
18+
struct wrapper_base {
19+
explicit wrapper_base(basic_message<Tag> & message_)
20+
: _message(message_)
21+
{};
2022

21-
basic_message<Tag> & _message;
22-
};
23+
protected:
24+
~wrapper_base() {}; // for extending only
2325

24-
template <class Tag>
25-
struct wrapper_base_const {
26-
explicit wrapper_base_const(basic_message<Tag> const & message_)
27-
: _message(message_)
28-
{}
26+
basic_message<Tag> & _message;
27+
};
2928

30-
protected:
31-
~wrapper_base_const() {}; // for extending only
29+
template <class Tag>
30+
struct wrapper_base_const {
31+
explicit wrapper_base_const(basic_message<Tag> const & message_)
32+
: _message(message_)
33+
{}
3234

33-
basic_message<Tag> const & _message;
34-
};
35+
protected:
36+
~wrapper_base_const() {}; // for extending only
3537

38+
basic_message<Tag> const & _message;
39+
};
3640

37-
} // namespace detail
41+
} // namespace detail
3842

3943
} // namespace network
4044

boost/network/message/directives/remove_header.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
namespace boost { namespace network {
1515

16+
template <class Tag>
17+
struct basic_message;
18+
1619
namespace impl {
1720
template <
1821
class T

boost/network/message/modifiers/add_header.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ namespace boost { namespace network {
2727
message.add_header(std::make_pair(key, value));
2828
}
2929

30-
template <class Message, class KeyType, class ValueType, class Async>
31-
inline void add_header(Message const & message, KeyType const & key, ValueType const & value, tags::http_server const &, Async const &) {
32-
typedef typename Message::headers_container_type::value_type value_type;
33-
value_type header_ = { key, value };
34-
message.headers.insert(message.headers.end(), header_);
35-
}
36-
3730
}
3831

3932
template <class Tag, template <class> class Message, class KeyType, class ValueType>

boost/network/message/modifiers/body.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ namespace boost { namespace network {
2323
message.body(body_);
2424
}
2525

26-
template <class Message, class ValueType, class Async>
27-
inline void body(Message const & message, ValueType const & body_, tags::http_server, Async) {
28-
message.body = body_;
29-
}
30-
3126
} // namespace impl
3227

3328
template <class Tag, template <class> class Message, class ValueType>

boost/network/message/modifiers/clear_headers.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ namespace boost { namespace network {
2525
header_promise.set_value(typename Message::headers_container_type());
2626
}
2727

28-
template <class Message, class Async>
29-
inline void clear_headers(Message const & message, tags::http_server const &, Async const &) {
30-
(typename Message::headers_container_type()).swap(message.headers);
31-
}
32-
3328
} // namespace impl
3429

3530
template <class Tag, template <class> class Message>

boost/network/message/modifiers/destination.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ namespace boost { namespace network {
2424
message.destination(destination_);
2525
}
2626

27-
template <class Message, class ValueType, class Async>
28-
inline void destination(Message const & message, ValueType const & destination_, tags::http_server, Async) {
29-
message.destination = destination_;
30-
}
3127
}
3228

3329
template <class Tag, template<class> class Message, class ValueType>

boost/network/message/modifiers/remove_header.hpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// http://www.boost.org/LICENSE_1_0.txt)
99

1010
#include <boost/network/support/is_async.hpp>
11-
#include <algorithm>
1211

1312
namespace boost { namespace network {
1413

@@ -29,29 +28,6 @@ namespace boost { namespace network {
2928
message.remove_header(key);
3029
}
3130

32-
template <class KeyType>
33-
struct equals {
34-
explicit equals(KeyType const & key_)
35-
: key(key_) {}
36-
equals(equals const & other)
37-
: key(other.key) {}
38-
template <class RequestHeader>
39-
bool operator()(RequestHeader const & header) {
40-
return boost::iequals(header.name, key);
41-
}
42-
KeyType const & key;
43-
};
44-
45-
template <class Message, class KeyType, class Async>
46-
inline void remove_header(Message const & message, KeyType const & key, tags::http_server const &, Async const &) {
47-
typedef typename Message::headers_container_type::iterator iterator;
48-
iterator end = message.headers.end();
49-
iterator new_end = std::remove_if(
50-
message.headers.begin(),
51-
message.headers.end(),
52-
equals<KeyType>(key));
53-
message.headers.erase(new_end, end);
54-
}
5531

5632
} // namespace impl
5733

boost/network/message/modifiers/source.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ namespace boost { namespace network {
2323
message.source(source_);
2424
}
2525

26-
template <class Message, class ValueType, class Async>
27-
inline void source(Message const & message, ValueType const & source_, tags::http_server const &, Async const &) {
28-
message.source = source_;
29-
}
30-
3126
} // namespace impl
3227

3328
template <class Tag, template <class> class Message, class ValueType>

boost/network/protocol/http/client/facade.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include <boost/network/protocol/http/request.hpp>
1010
#include <boost/network/protocol/http/response.hpp>
11-
#include <boost/network/support/sync_only.hpp>
11+
#include <boost/network/protocol/http/support/sync_only.hpp>
1212

1313
namespace boost { namespace network { namespace http {
1414

boost/network/protocol/http/impl/request.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ namespace boost { namespace network { namespace http {
159159

160160
/** Specialize the traits for the http_server tag. */
161161
template <>
162-
struct headers_container<tags::http_server> :
163-
vector<tags::http_server>::apply<http::request_header>
162+
struct headers_container<http::tags::http_server> :
163+
vector<http::tags::http_server>::apply<http::request_header>
164164
{};
165165

166166
namespace http { namespace impl {

0 commit comments

Comments
 (0)