8
8
#define BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_OPTIONS_IPP
9
9
10
10
#include < boost/network/protocol/http/client/options.hpp>
11
+ #include < boost/network/protocol/http/client/simple_connection_manager.hpp>
12
+ #include < boost/network/protocol/http/client/connection/simple_connection_factory.hpp>
11
13
12
14
namespace boost { namespace network { namespace http {
13
15
@@ -19,7 +21,10 @@ public:
19
21
, cache_resolved_(false )
20
22
, openssl_certificate_paths_()
21
23
, openssl_verify_paths_()
22
- {}
24
+ , connection_manager_()
25
+ , connection_factory_()
26
+ {
27
+ }
23
28
24
29
client_options_pimpl *clone () const {
25
30
return new (std::nothrow) client_options_pimpl (*this );
@@ -65,13 +70,31 @@ public:
65
70
return openssl_verify_paths_;
66
71
}
67
72
73
+ void connection_manager (shared_ptr<http::connection_manager> manager) {
74
+ connection_manager_ = manager;
75
+ }
76
+
77
+ shared_ptr<http::connection_manager> connection_manager () const {
78
+ return connection_manager_;
79
+ }
80
+
81
+ void connection_factory (shared_ptr<http::connection_factory> factory) {
82
+ connection_factory_ = factory;
83
+ }
84
+
85
+ shared_ptr<http::connection_factory> connection_factory () const {
86
+ return connection_factory_;
87
+ }
88
+
68
89
private:
69
90
client_options_pimpl (client_options_pimpl const &other)
70
91
: io_service_(other.io_service_)
71
92
, follow_redirects_(other.follow_redirects_)
72
93
, cache_resolved_(other.cache_resolved_)
73
94
, openssl_certificate_paths_(other.openssl_certificate_paths_)
74
95
, openssl_verify_paths_(other.openssl_verify_paths_)
96
+ , connection_manager_(other.connection_manager_)
97
+ , connection_factory_(other.connection_factory_)
75
98
{}
76
99
77
100
client_options_pimpl& operator =(client_options_pimpl); // cannot assign
@@ -80,6 +103,8 @@ private:
80
103
asio::io_service *io_service_;
81
104
bool follow_redirects_, cache_resolved_;
82
105
std::list<std::string> openssl_certificate_paths_, openssl_verify_paths_;
106
+ shared_ptr<http::connection_manager> connection_manager_;
107
+ shared_ptr<http::connection_factory> connection_factory_;
83
108
};
84
109
85
110
client_options::client_options ()
@@ -149,6 +174,24 @@ std::list<std::string> const & client_options::openssl_verify_paths() const {
149
174
return pimpl->openssl_verify_paths ();
150
175
}
151
176
177
+ client_options& client_options::connection_manager (shared_ptr<http::connection_manager> manager) {
178
+ pimpl->connection_manager (manager);
179
+ return *this ;
180
+ }
181
+
182
+ shared_ptr<http::connection_manager> client_options::connection_manager () const {
183
+ return pimpl->connection_manager ();
184
+ }
185
+
186
+ client_options& client_options::connection_factory (shared_ptr<http::connection_factory> factory) {
187
+ pimpl->connection_factory (factory);
188
+ return *this ;
189
+ }
190
+
191
+ shared_ptr<http::connection_factory> client_options::connection_factory () const {
192
+ return pimpl->connection_factory ();
193
+ }
194
+
152
195
} // namespace http
153
196
} // namespace network
154
197
} // namespace boost
0 commit comments