File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ namespace crow
143
143
ctx_ = detail::context<Middlewares...>();
144
144
req_.middleware_context = static_cast <void *>(&ctx_);
145
145
req_.middleware_container = static_cast <void *>(middlewares_);
146
- req_.io_context = &adaptor_.get_io_service ();
146
+ req_.io_context = &adaptor_.get_io_context ();
147
147
148
148
req_.remote_ip_address = adaptor_.remote_endpoint ().address ().to_string ();
149
149
Original file line number Diff line number Diff line change 19
19
#include " crow/settings.h"
20
20
21
21
#if (CROW_USE_BOOST && BOOST_VERSION >= 107000) || (ASIO_VERSION >= 101300)
22
- #define GET_IO_SERVICE (s ) ((asio::io_context&)(s).get_executor().context())
22
+ #define GET_IO_CONTEXT (s ) ((asio::io_context&)(s).get_executor().context())
23
23
#else
24
- #define GET_IO_SERVICE (s ) ((s).get_io_service())
24
+ #define GET_IO_CONTEXT (s ) ((s).get_io_service())
25
25
#endif
26
26
27
27
namespace crow
@@ -42,9 +42,9 @@ namespace crow
42
42
socket_ (io_context)
43
43
{}
44
44
45
- asio::io_context& get_io_service ()
45
+ asio::io_context& get_io_context ()
46
46
{
47
- return GET_IO_SERVICE (socket_);
47
+ return GET_IO_CONTEXT (socket_);
48
48
}
49
49
50
50
// / Get the TCP socket handling data trasfers, regardless of what layer is handling transfers on top of the socket.
@@ -168,9 +168,9 @@ namespace crow
168
168
}
169
169
}
170
170
171
- asio::io_context& get_io_service ()
171
+ asio::io_context& get_io_context ()
172
172
{
173
- return GET_IO_SERVICE (raw_socket ());
173
+ return GET_IO_CONTEXT (raw_socket ());
174
174
}
175
175
176
176
template <typename F>
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ namespace crow // NOTE: Already documented in "crow/app.h"
202
202
template <typename CompletionHandler>
203
203
void dispatch (CompletionHandler&& handler)
204
204
{
205
- asio::dispatch (adaptor_.get_io_service (),
205
+ asio::dispatch (adaptor_.get_io_context (),
206
206
WeakWrappedMessage<typename std::decay<CompletionHandler>::type>{
207
207
std::forward<CompletionHandler>(handler), anchor_});
208
208
}
@@ -211,7 +211,7 @@ namespace crow // NOTE: Already documented in "crow/app.h"
211
211
template <typename CompletionHandler>
212
212
void post (CompletionHandler&& handler)
213
213
{
214
- asio::post (adaptor_.get_io_service (),
214
+ asio::post (adaptor_.get_io_context (),
215
215
WeakWrappedMessage<typename std::decay<CompletionHandler>::type>{
216
216
std::forward<CompletionHandler>(handler), anchor_});
217
217
}
You can’t perform that action at this time.
0 commit comments