summaryrefslogtreecommitdiff
path: root/run/run.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'run/run.cpp')
-rw-r--r--run/run.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/run/run.cpp b/run/run.cpp
index b85e001..756b30c 100644
--- a/run/run.cpp
+++ b/run/run.cpp
@@ -3,6 +3,7 @@
#include <boost/program_options.hpp>
#include <boost/filesystem.hpp>
#include <boost/asio.hpp>
+#include <boost/asio/post.hpp>
#include <iostream>
#include <fstream>
@@ -24,7 +25,7 @@ void action_handler(boost::system::error_code const& error, size_t)
{
}
- io_context.post([](){
+ boost::asio::post(io_context, [](){
connection_socket.async_receive(boost::asio::buffer(&message_size, sizeof message_size), 0, action_handler);
});
}
@@ -53,7 +54,7 @@ void accept_handler(boost::system::error_code const& error)
connection_socket.send(boost::asio::buffer(&message, sizeof message));
connection_socket.send(boost::asio::buffer(binary, binary.size()));
- io_context.post([](){
+ boost::asio::post(io_context, [](){
connection_socket.async_receive(boost::asio::buffer(&message_size, sizeof message_size), 0, action_handler);
});
}