@@ -33,9 +33,9 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
33
33
typedef http_async_connection_pimpl this_type;
34
34
35
35
http_async_connection_pimpl (
36
- shared_ptr<resolver_delegate> resolver_delegate,
37
- shared_ptr<connection_delegate> connection_delegate,
38
- asio::io_service & io_service,
36
+ boost:: shared_ptr<resolver_delegate> resolver_delegate,
37
+ boost:: shared_ptr<connection_delegate> connection_delegate,
38
+ boost:: asio::io_service & io_service,
39
39
bool follow_redirect)
40
40
:
41
41
follow_redirect_ (follow_redirect),
@@ -137,7 +137,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
137
137
resolver_iterator iter = boost::begin (endpoint_range);
138
138
NETWORK_MESSAGE (" trying connection to: "
139
139
<< iter->endpoint ().address () << " :" << port);
140
- asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
140
+ boost:: asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
141
141
connection_delegate_->connect (
142
142
endpoint,
143
143
this ->host_ ,
@@ -181,7 +181,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
181
181
if (!boost::empty (endpoint_range)) {
182
182
resolver_iterator iter = boost::begin (endpoint_range);
183
183
NETWORK_MESSAGE (" trying: " << iter->endpoint ().address () << " :" << port);
184
- asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
184
+ boost:: asio::ip::tcp::endpoint endpoint (iter->endpoint ().address (), port);
185
185
connection_delegate_->connect (endpoint,
186
186
this ->host_ ,
187
187
request_strand_.wrap (
@@ -235,15 +235,15 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
235
235
static long short_read_error = 335544539 ;
236
236
bool is_short_read_error =
237
237
#ifdef NETWORK_ENABLE_HTTPS
238
- ec.category () == asio::error::ssl_category &&
238
+ ec.category () == boost:: asio::error::ssl_category &&
239
239
ec.value () == short_read_error
240
240
#else
241
241
false
242
242
#endif
243
243
;
244
244
if (!ec || ec == boost::asio::error::eof || is_short_read_error) {
245
245
NETWORK_MESSAGE (" processing data chunk, no error encountered so far..." );
246
- logic::tribool parsed_ok;
246
+ boost:: logic::tribool parsed_ok;
247
247
size_t remainder;
248
248
switch (state) {
249
249
case version:
@@ -291,7 +291,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
291
291
// in the buffer. We need this in the body processing to make sure
292
292
// that the data remaining in the buffer is dealt with before
293
293
// another call to get more data for the body is scheduled.
294
- fusion::tie (parsed_ok, remainder) =
294
+ boost:: fusion::tie (parsed_ok, remainder) =
295
295
this ->parse_headers (
296
296
request_strand_.wrap (
297
297
boost::bind (
@@ -511,17 +511,17 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
511
511
}
512
512
};
513
513
514
- logic::tribool parse_version (
515
- function<void (system::error_code, size_t )> callback,
514
+ boost:: logic::tribool parse_version (
515
+ boost:: function<void (boost:: system::error_code, size_t )> callback,
516
516
size_t bytes) {
517
- logic::tribool parsed_ok;
517
+ boost:: logic::tribool parsed_ok;
518
518
part_begin = part.begin ();
519
519
buffer_type::const_iterator part_end = part.begin ();
520
520
std::advance (part_end, bytes);
521
521
boost::iterator_range<buffer_type::const_iterator>
522
522
result_range,
523
523
input_range = boost::make_iterator_range (part_begin, part_end);
524
- fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
524
+ boost:: fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
525
525
response_parser::http_version_done,
526
526
input_range);
527
527
if (parsed_ok == true ) {
@@ -566,16 +566,16 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
566
566
return parsed_ok;
567
567
}
568
568
569
- logic::tribool parse_status (
570
- function<void (system::error_code, size_t )> callback,
569
+ boost:: logic::tribool parse_status (
570
+ boost:: function<void (boost:: system::error_code, size_t )> callback,
571
571
size_t bytes) {
572
- logic::tribool parsed_ok;
572
+ boost:: logic::tribool parsed_ok;
573
573
buffer_type::const_iterator part_end = part.begin ();
574
574
std::advance (part_end, bytes);
575
575
boost::iterator_range< buffer_type::const_iterator>
576
576
result_range,
577
577
input_range = boost::make_iterator_range (part_begin, part_end);
578
- fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
578
+ boost:: fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
579
579
response_parser::http_status_done,
580
580
input_range);
581
581
if (parsed_ok == true ) {
@@ -621,16 +621,16 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
621
621
return parsed_ok;
622
622
}
623
623
624
- logic::tribool parse_status_message (
625
- function<void (system::error_code, size_t )> callback,
624
+ boost:: logic::tribool parse_status_message (
625
+ boost:: function<void (boost:: system::error_code, size_t )> callback,
626
626
size_t bytes) {
627
- logic::tribool parsed_ok;
627
+ boost:: logic::tribool parsed_ok;
628
628
buffer_type::const_iterator part_end = part.begin ();
629
629
std::advance (part_end, bytes);
630
630
boost::iterator_range< buffer_type::const_iterator>
631
631
result_range,
632
632
input_range = boost::make_iterator_range (part_begin, part_end);
633
- fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
633
+ boost:: fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
634
634
response_parser::http_status_message_done,
635
635
input_range);
636
636
if (parsed_ok == true ) {
@@ -676,13 +676,13 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
676
676
boost::iterator_range< std::string::const_iterator>
677
677
input_range = boost::make_iterator_range (headers_part)
678
678
, result_range;
679
- logic::tribool parsed_ok;
679
+ boost:: logic::tribool parsed_ok;
680
680
response_parser headers_parser (
681
681
response_parser::http_header_line_done);
682
682
std::multimap<std::string, std::string> headers;
683
683
std::pair<std::string,std::string> header_pair;
684
684
while (!boost::empty (input_range)) {
685
- fusion::tie (parsed_ok, result_range) =
685
+ boost:: fusion::tie (parsed_ok, result_range) =
686
686
headers_parser.parse_until (
687
687
response_parser::http_header_colon,
688
688
input_range);
@@ -692,7 +692,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
692
692
header_pair.first = std::string (boost::begin (result_range),
693
693
boost::end (result_range));
694
694
input_range.advance_begin (boost::distance (result_range));
695
- fusion::tie (parsed_ok, result_range) =
695
+ boost:: fusion::tie (parsed_ok, result_range) =
696
696
headers_parser.parse_until (
697
697
response_parser::http_header_line_done,
698
698
input_range);
@@ -712,16 +712,16 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
712
712
headers_promise.set_value (headers);
713
713
}
714
714
715
- fusion::tuple<logic::tribool, size_t > parse_headers (
716
- function<void (system::error_code, size_t )> callback,
715
+ boost:: fusion::tuple<boost:: logic::tribool, size_t > parse_headers (
716
+ boost:: function<void (boost:: system::error_code, size_t )> callback,
717
717
size_t bytes) {
718
- logic::tribool parsed_ok;
718
+ boost:: logic::tribool parsed_ok;
719
719
buffer_type::const_iterator part_end = part.begin ();
720
720
std::advance (part_end, bytes);
721
721
boost::iterator_range<buffer_type::const_iterator>
722
722
result_range,
723
723
input_range = boost::make_iterator_range (part_begin, part_end);
724
- fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
724
+ boost:: fusion::tie (parsed_ok, result_range) = response_parser_.parse_until (
725
725
response_parser::http_headers_done,
726
726
input_range);
727
727
if (parsed_ok == true ) {
@@ -759,7 +759,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
759
759
callback
760
760
);
761
761
}
762
- return fusion::make_tuple (
762
+ return boost:: fusion::make_tuple (
763
763
parsed_ok,
764
764
std::distance (
765
765
boost::end (result_range)
@@ -768,7 +768,7 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
768
768
);
769
769
}
770
770
771
- void parse_body (function<void (system::error_code, size_t )> callback, size_t bytes) {
771
+ void parse_body (boost:: function<void (boost:: system::error_code, size_t )> callback, size_t bytes) {
772
772
// TODO: we should really not use a string for the partial body
773
773
// buffer.
774
774
partial_parsed.append (part_begin, bytes);
@@ -781,8 +781,8 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
781
781
782
782
bool follow_redirect_;
783
783
boost::asio::io_service::strand request_strand_;
784
- shared_ptr<resolver_delegate> resolver_delegate_;
785
- shared_ptr<connection_delegate> connection_delegate_;
784
+ boost:: shared_ptr<resolver_delegate> resolver_delegate_;
785
+ boost:: shared_ptr<connection_delegate> connection_delegate_;
786
786
boost::asio::streambuf command_streambuf;
787
787
std::string method;
788
788
response_parser response_parser_;
@@ -802,22 +802,22 @@ struct http_async_connection_pimpl : boost::enable_shared_from_this<http_async_c
802
802
803
803
// END OF PIMPL DEFINITION
804
804
805
- http_async_connection::http_async_connection (shared_ptr<resolver_delegate> resolver_delegate,
806
- shared_ptr<connection_delegate> connection_delegate,
807
- asio::io_service & io_service,
805
+ http_async_connection::http_async_connection (boost:: shared_ptr<resolver_delegate> resolver_delegate,
806
+ boost:: shared_ptr<connection_delegate> connection_delegate,
807
+ boost:: asio::io_service & io_service,
808
808
bool follow_redirects)
809
809
: pimpl(new (std::nothrow) http_async_connection_pimpl(resolver_delegate,
810
810
connection_delegate,
811
811
io_service,
812
812
follow_redirects)) {}
813
813
814
- http_async_connection::http_async_connection (shared_ptr<http_async_connection_pimpl> new_pimpl)
814
+ http_async_connection::http_async_connection (boost:: shared_ptr<http_async_connection_pimpl> new_pimpl)
815
815
: pimpl(new_pimpl) {}
816
816
817
817
http_async_connection::~http_async_connection () {}
818
818
819
819
http_async_connection * http_async_connection::clone () const {
820
- shared_ptr<http_async_connection_pimpl> new_pimpl (pimpl->clone ());
820
+ boost:: shared_ptr<http_async_connection_pimpl> new_pimpl (pimpl->clone ());
821
821
return new (std::nothrow) http_async_connection (new_pimpl);
822
822
}
823
823
0 commit comments