File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,15 @@ struct Message
27
27
M message_;
28
28
swap (message, message_);
29
29
30
- headers_container_type &headers_ = message.headers ();
31
- string_type &body_ = message.body ();
32
- string_type &source_ = message.source ();
33
- string_type &destination_ = message.destination ();
30
+ headers_container_type headers_ = headers (message);
31
+ string_type body_ = body (message);
32
+ string_type source_ = source (message);
33
+ string_type destination_ = destination (message);
34
+
35
+ message << source (string_type ())
36
+ << destination (string_type ())
37
+ << header (string_type (), string_type ())
38
+ << body (string_type ());
34
39
35
40
(void )headers_;
36
41
(void )body_;
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ namespace boost { namespace network {
34
34
* headers_range<basic_message<tag> >::type
35
35
* Which allows for full range support.
36
36
*
37
+ * The type is also convertible to a
38
+ * headers_container<Tag>::type
39
+ * Which copies the headers from the wrapped message.
40
+ *
37
41
*/
38
42
namespace impl {
39
43
template <class Tag >
@@ -70,6 +74,10 @@ namespace boost { namespace network {
70
74
return make_iterator_range (headers_wrapper<Tag>::_message.headers ().begin (), headers_wrapper<Tag>::_message.headers ().end ());
71
75
};
72
76
77
+ operator headers_container_type () {
78
+ return headers_wrapper<Tag>::_message.headers ();
79
+ }
80
+
73
81
};
74
82
} // namespace impl
75
83
You can’t perform that action at this time.
0 commit comments