File tree 20 files changed +144
-93
lines changed
20 files changed +144
-93
lines changed Original file line number Diff line number Diff line change 8
8
//
9
9
// This is the modular include file for using the basic message type
10
10
11
+ #include < boost/network/tags.hpp>
11
12
#include < boost/network/message.hpp>
12
13
13
14
#endif // BOOST_NETWORK_INCLUDE_MESSAGE_HPP_
Original file line number Diff line number Diff line change 6
6
#ifndef __NETWORK_MESSAGE_HPP__
7
7
#define __NETWORK_MESSAGE_HPP__
8
8
9
- #include " boost/network/message_fwd.hpp"
9
+ #include < boost/network/message_fwd.hpp>
10
10
#include < boost/network/traits/string.hpp>
11
11
#include < boost/network/traits/ostringstream.hpp>
12
12
#include < boost/network/traits/headers_container.hpp>
@@ -38,7 +38,7 @@ namespace boost { namespace network {
38
38
/* * The common message type.
39
39
*/
40
40
template <class Tag >
41
- class basic_message {
41
+ struct basic_message {
42
42
public:
43
43
44
44
typedef Tag tag;
@@ -138,9 +138,12 @@ namespace boost { namespace network {
138
138
// swap for ADL
139
139
left.swap (right);
140
140
}
141
-
142
- BOOST_CONCEPT_ASSERT ((Message<basic_message<boost::network::tags::default_string> >));
143
- BOOST_CONCEPT_ASSERT ((Message<basic_message<boost::network::tags::default_wstring> >));
141
+
142
+ // Commenting this out as we don't need to do this anymore.
143
+ // BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_string> >));
144
+ // BOOST_CONCEPT_ASSERT((Message<basic_message<boost::network::tags::default_wstring> >));
145
+ typedef basic_message<tags::default_string> message;
146
+ typedef basic_message<tags::default_wstring> wmessage;
144
147
145
148
} // namespace network
146
149
} // namespace boost
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace boost { namespace network {
25
25
};
26
26
27
27
template <class Tag >
28
- class basic_message ;
28
+ struct basic_message ;
29
29
30
30
/* * headers wrapper for messages.
31
31
*
Original file line number Diff line number Diff line change 6
6
#ifndef __2008817MESSAGE_FWD_INC__
7
7
# define __2008817MESSAGE_FWD_INC__
8
8
9
-
10
- // Includes
11
- # include < boost/network/tags.hpp>
12
-
13
-
14
9
namespace boost {
15
10
namespace network {
16
- template <
17
- class Tag
18
- >
19
- class basic_message ;
20
11
12
+ template <class Tag >
13
+ struct basic_message ;
21
14
22
- typedef basic_message<tags::default_string> message;
23
- typedef basic_message<tags::default_wstring> wmessage;
24
15
} // namespace boost
25
16
} // namespace network
26
17
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ namespace boost { namespace network { namespace http { namespace impl {
50
50
resolve_function resolve,
51
51
bool follow_redirect
52
52
) :
53
+ follow_redirect_ (follow_redirect),
53
54
resolver_ (resolver),
54
55
resolve_ (resolve),
55
- follow_redirect_ (follow_redirect),
56
56
request_strand_ (new boost::asio::io_service::strand(resolver->get_io_service ()))
57
57
{}
58
58
@@ -303,11 +303,11 @@ namespace boost { namespace network { namespace http { namespace impl {
303
303
}
304
304
}
305
305
306
- boost::shared_ptr<boost::asio::io_service::strand> request_strand_ ;
306
+ bool follow_redirect_ ;
307
307
boost::shared_ptr<resolver_type> resolver_;
308
308
boost::shared_ptr<boost::asio::ip::tcp::socket> socket_;
309
309
resolve_function resolve_;
310
- bool follow_redirect_ ;
310
+ boost::shared_ptr<boost::asio::io_service::strand> request_strand_ ;
311
311
string_type command_string_;
312
312
string_type method;
313
313
};
Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ namespace boost { namespace network { namespace http { namespace impl {
39
39
bool follow_redirect,
40
40
optional<string_type> const & certificate_filename = optional<string_type>()
41
41
) :
42
+ follow_redirect_ (follow_redirect),
42
43
resolver_ (resolver),
44
+ certificate_filename_ (certificate_filename),
43
45
resolve_ (resolve),
44
- follow_redirect_ (follow_redirect),
45
- request_strand_ (new boost::asio::io_service::strand(resolver->get_io_service ())),
46
- certificate_filename_(certificate_filename)
46
+ request_strand_ (new boost::asio::io_service::strand(resolver->get_io_service ()))
47
47
{}
48
48
49
49
@@ -337,13 +337,13 @@ namespace boost { namespace network { namespace http { namespace impl {
337
337
}
338
338
}
339
339
340
- boost::shared_ptr<boost::asio::io_service::strand> request_strand_ ;
340
+ bool follow_redirect_ ;
341
341
boost::shared_ptr<resolver_type> resolver_;
342
342
optional<string_type> certificate_filename_;
343
343
resolve_function resolve_;
344
344
boost::shared_ptr<boost::asio::ssl::context> context_;
345
345
boost::shared_ptr<boost::asio::ssl::stream<boost::asio::ip::tcp::socket> > socket_;
346
- bool follow_redirect_ ;
346
+ boost::shared_ptr<boost::asio::io_service::strand> request_strand_ ;
347
347
string_type command_string_;
348
348
string_type method;
349
349
};
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/concept/requires.hpp>
11
-
12
10
namespace boost { namespace network { namespace http {
13
11
14
12
template <class Tag >
@@ -27,12 +25,8 @@ namespace boost { namespace network { namespace http {
27
25
};
28
26
}
29
27
30
- template <class Message >
31
- struct Request ;
32
-
33
28
template <class Tag > inline
34
- BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
35
- (impl::anchor_wrapper<Tag>))
29
+ impl::anchor_wrapper<Tag>
36
30
anchor (basic_request<Tag> const & request) {
37
31
return impl::anchor_wrapper<Tag>(request);
38
32
}
Original file line number Diff line number Diff line change @@ -31,23 +31,16 @@ namespace boost { namespace network { namespace http {
31
31
32
32
} // namespace impl
33
33
34
- template <class R >
35
- struct Response ;
36
-
37
- template <class R >
38
- struct Request ;
39
-
40
34
template <class Tag >
41
35
inline
42
- BOOST_CONCEPT_REQUIRES (((Response<basic_response<Tag> >)),
43
- (typename impl::body_wrapper<basic_response<Tag> >::string_type const ))
36
+ typename impl::body_wrapper<basic_response<Tag> >::string_type const
44
37
body (basic_response<Tag> const & message) {
45
38
return impl::body_wrapper<basic_response<Tag> >(message);
46
39
}
47
40
48
41
template <class Tag >
49
- inline BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
50
- ( typename impl::body_wrapper<basic_request<Tag> >::string_type const ))
42
+ inline
43
+ typename impl::body_wrapper<basic_request<Tag> >::string_type const
51
44
body (basic_request<Tag> const & message) {
52
45
return impl::body_wrapper<basic_request<Tag> >(message);
53
46
}
Original file line number Diff line number Diff line change 7
7
// http://www.boost.org/LICENSE_1_0.txt)
8
8
9
9
#include < boost/mpl/if.hpp>
10
- #include < boost/concept/requires.hpp>
11
10
12
11
#ifndef BOOST_NETWORK_DEFINE_HTTP_WRAPPER
13
12
#define BOOST_NETWORK_DEFINE_HTTP_WRAPPER (name, accessor, pod_field ) \
48
47
: message_(message) {} \
49
48
name##_wrapper(name##_wrapper const & other) \
50
49
: message_(other.message_) {} \
51
- operator string_type () { \
50
+ operator string_type () const { \
52
51
return this ->get_value (message_); \
53
52
} \
54
53
}; \
55
54
\
56
55
template <class Tag > \
57
- inline BOOST_CONCEPT_REQUIRES (((Response<basic_response<Tag> >)), \
58
- ( name##_wrapper<basic_response<Tag> > const )) \
56
+ inline \
57
+ name##_wrapper<basic_response<Tag> > const \
59
58
name (basic_response<Tag> const & message) { \
60
59
return name##_wrapper<basic_response<Tag> >(message); \
61
60
} \
62
61
\
63
62
template <class Tag > \
64
- inline BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)), \
65
- ( name##_wrapper<basic_request<Tag> > const )) \
63
+ inline \
64
+ name##_wrapper<basic_request<Tag> > const \
66
65
name (basic_request<Tag> const & message) { \
67
66
return name##_wrapper<basic_request<Tag> >(message); \
68
67
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/network/protocol/http/request_concept.hpp>
11
- #include < boost/concept/requires.hpp>
12
-
13
10
namespace boost { namespace network { namespace http {
14
11
15
12
template <class Tag >
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
35
32
36
33
template <class Tag >
37
34
inline
38
- BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
39
- (impl::host_wrapper<Tag>))
35
+ impl::host_wrapper<Tag>
40
36
host (basic_request<Tag> const & request) {
41
37
return impl::host_wrapper<Tag>(request);
42
38
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/network/protocol/http/request_concept.hpp>
11
- #include < boost/concept/requires.hpp>
12
-
13
10
namespace boost { namespace network { namespace http {
14
11
15
12
template <class Tag >
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
35
32
36
33
template <class Tag >
37
34
inline
38
- BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
39
- (impl::path_wrapper<Tag>))
35
+ impl::path_wrapper<Tag>
40
36
path (basic_request<Tag> const & request) {
41
37
return impl::path_wrapper<Tag>(request);
42
38
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/network/protocol/http/request_concept.hpp>
11
- #include < boost/concept/requires.hpp>
12
-
13
10
namespace boost { namespace network { namespace http {
14
11
15
12
template <class Tag >
@@ -35,8 +32,7 @@ namespace boost { namespace network { namespace http {
35
32
36
33
template <class Tag >
37
34
inline
38
- BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
39
- (impl::port_wrapper<Tag>))
35
+ impl::port_wrapper<Tag>
40
36
port (basic_request<Tag> const & request) {
41
37
return impl::port_wrapper<Tag>(request);
42
38
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/network/protocol/http/request_concept.hpp>
11
- #include < boost/concept/requires.hpp>
12
-
13
10
namespace boost { namespace network { namespace http {
14
11
15
12
template <class Tag >
@@ -29,8 +26,7 @@ namespace boost { namespace network { namespace http {
29
26
}
30
27
31
28
template <class Tag > inline
32
- BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
33
- (impl::protocol_wrapper<Tag>))
29
+ impl::protocol_wrapper<Tag>
34
30
protocol (basic_request<Tag> const & request) {
35
31
return impl::protocol_wrapper<Tag>(request);
36
32
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/network/protocol/http/request_concept.hpp>
11
- #include < boost/concept/requires.hpp>
12
-
13
10
namespace boost { namespace network { namespace http {
14
11
15
12
template <class Tag >
@@ -36,8 +33,7 @@ namespace boost { namespace network { namespace http {
36
33
37
34
template <class Tag >
38
35
inline
39
- BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
40
- (impl::query_wrapper<Tag>))
36
+ impl::query_wrapper<Tag>
41
37
query (basic_request<Tag> const & request) {
42
38
return impl::query_wrapper<Tag>(request);
43
39
}
Original file line number Diff line number Diff line change 8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
10
#include < boost/cstdint.hpp>
11
- #include < boost/concept/requires.hpp>
12
11
13
12
namespace boost { namespace network { namespace http {
14
13
@@ -41,8 +40,7 @@ namespace boost { namespace network { namespace http {
41
40
42
41
template <class Tag >
43
42
inline
44
- BOOST_CONCEPT_REQUIRES (((Response<basic_response<Tag> >)),
45
- (impl::status_wrapper<Tag>))
43
+ impl::status_wrapper<Tag>
46
44
status (basic_response<Tag> const & response) {
47
45
return impl::status_wrapper<Tag>(response);
48
46
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/concept/requires.hpp>
11
-
12
10
namespace boost { namespace network { namespace http {
13
11
14
12
template <class Tag >
@@ -39,9 +37,7 @@ namespace boost { namespace network { namespace http {
39
37
40
38
template <class Tag >
41
39
inline
42
- BOOST_CONCEPT_REQUIRES (
43
- ((Response<basic_response<Tag> >)),
44
- (impl::status_message_wrapper<Tag>))
40
+ impl::status_message_wrapper<Tag>
45
41
status_message (basic_response<Tag> const & response) {
46
42
return impl::status_message_wrapper<Tag>(response);
47
43
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/network/protocol/http/request_concept.hpp>
11
- #include < boost/concept/requires.hpp>
12
-
13
10
namespace boost { namespace network { namespace http {
14
11
15
12
template <class Tag >
@@ -29,8 +26,7 @@ namespace boost { namespace network { namespace http {
29
26
}
30
27
31
28
template <class Tag > inline
32
- BOOST_CONCEPT_REQUIRES (((Request<basic_request<Tag> >)),
33
- (impl::uri_wrapper<Tag>))
29
+ impl::uri_wrapper<Tag>
34
30
uri (basic_request<Tag> const & request) {
35
31
return impl::uri_wrapper<Tag>(request);
36
32
}
Original file line number Diff line number Diff line change 7
7
// (See accompanying file LICENSE_1_0.txt or copy at
8
8
// http://www.boost.org/LICENSE_1_0.txt)
9
9
10
- #include < boost/concept/requires.hpp>
11
-
12
10
namespace boost { namespace network { namespace http {
13
11
14
12
template <class Tag >
@@ -39,9 +37,7 @@ namespace boost { namespace network { namespace http {
39
37
40
38
template <class Tag >
41
39
inline
42
- BOOST_CONCEPT_REQUIRES (
43
- ((Response<basic_response<Tag> >)),
44
- (impl::version_wrapper<Tag>))
40
+ impl::version_wrapper<Tag>
45
41
version (basic_response<Tag> const & response) {
46
42
return impl::version_wrapper<Tag>(response);
47
43
}
You can’t perform that action at this time.
0 commit comments