Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit769be88

Browse files
committed
Merge pull request#659 from burannah/asio_standalone
Asio standalone
2 parents1d767d2 +297b5bf commit769be88

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

‎CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ if (Boost_FOUND)
9898
include_directories(${Boost_INCLUDE_DIRS})
9999

100100
# Asio
101-
add_definitions(-DASIO_HEADER_ONLY)
101+
add_definitions(-DASIO_STANDALONE)
102102
include_directories(deps/asio/asio/include)
103103

104104
enable_testing()

‎boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include<iterator>
1313
#include<cstdint>
1414
#include<boost/algorithm/string/trim.hpp>
15-
#include<asio/deadline_timer.hpp>
15+
#include<asio/steady_timer.hpp>
1616
#include<asio/placeholders.hpp>
1717
#include<asio/strand.hpp>
1818
#include<asio/streambuf.hpp>
@@ -109,7 +109,7 @@ struct http_async_connection
109109
callback, generator, ec, endpoint_range);
110110
}));
111111
if (timeout_ >0) {
112-
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
112+
timer_.expires_from_now(std::chrono::seconds(timeout_));
113113
timer_.async_wait(request_strand_.wrap([=] (std::error_codeconst &ec) {
114114
self->handle_timeout(ec);
115115
}));
@@ -508,7 +508,7 @@ struct http_async_connection
508508
}
509509

510510
int timeout_;
511-
::asio::deadline_timer timer_;
511+
::asio::steady_timer timer_;
512512
bool is_timedout_;
513513
bool follow_redirect_;
514514
resolver_type& resolver_;

‎boost/network/protocol/http/client/connection/sync_normal.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include<iterator>
1212
#include<functional>
13-
#include<asio/deadline_timer.hpp>
13+
#include<asio/steady_timer.hpp>
1414
#include<asio/streambuf.hpp>
1515
#include<boost/network/protocol/http/algorithms/linearize.hpp>
1616
#include<boost/network/protocol/http/response.hpp>
@@ -77,7 +77,7 @@ struct http_sync_connection
7777
}
7878
}
7979
if (timeout_ >0) {
80-
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
80+
timer_.expires_from_now(std::chrono::seconds(timeout_));
8181
auto self =this->shared_from_this();
8282
timer_.async_wait([=] (std::error_codeconst &ec) {
8383
self->handle_timeout(ec);
@@ -132,7 +132,7 @@ struct http_sync_connection
132132
}
133133

134134
int timeout_;
135-
::asio::deadline_timer timer_;
135+
::asio::steady_timer timer_;
136136
resolver_type& resolver_;
137137
resolver_function_type resolve_;
138138
::asio::ip::tcp::socket socket_;

‎boost/network/protocol/http/client/connection/sync_ssl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct https_sync_connection
119119
}
120120
}
121121
if (timeout_ >0) {
122-
timer_.expires_from_now(boost::posix_time::seconds(timeout_));
122+
timer_.expires_from_now(std::chrono::seconds(timeout_));
123123
auto self =this->shared_from_this();
124124
timer_.async_wait(
125125
[=](std::error_codeconst& ec) { self->handle_timeout(ec); });
@@ -173,7 +173,7 @@ struct https_sync_connection
173173
}
174174

175175
int timeout_;
176-
::asio::deadline_timer timer_;
176+
::asio::steady_timer timer_;
177177
resolver_type& resolver_;
178178
resolver_function_type resolve_;
179179
::asio::ssl::context context_;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp