diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2025-09-10 16:19:18 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2025-09-10 16:19:18 +0200 |
| commit | 5d3ac5e0303c1b1b7d0c100b7369e4b8276a15b7 (patch) | |
| tree | f5b838bc2d8a520211eb1cc47891426bbc182d05 /run | |
| parent | b81ca2c41ff4d48ca03d9c0e9bb53dd39bdd0a48 (diff) | |
| download | openwar-5d3ac5e0303c1b1b7d0c100b7369e4b8276a15b7.tar.gz openwar-5d3ac5e0303c1b1b7d0c100b7369e4b8276a15b7.tar.bz2 openwar-5d3ac5e0303c1b1b7d0c100b7369e4b8276a15b7.zip | |
Diffstat (limited to 'run')
| -rw-r--r-- | run/run.cpp | 5 |
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); }); } |
