diff options
author | Giovanni Mascellani <gio@debian.org> | 2020-01-06 12:25:03 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-01-06 14:02:30 +0100 |
commit | 760302453396dcad193570889030e267c971834d (patch) | |
tree | 65d496646e294b050f0a43b5a7b3613606d34161 /src/syncTcpConnection.cpp | |
parent | fix build with boost 1.67 (diff) |
Fix build with Boost 1.71.
get_io_service() was deprecated in favour of get_executor() starting
from Boost 1.70.
Diffstat (limited to 'src/syncTcpConnection.cpp')
-rw-r--r-- | src/syncTcpConnection.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/syncTcpConnection.cpp b/src/syncTcpConnection.cpp index 027c775..9fe3dba 100644 --- a/src/syncTcpConnection.cpp +++ b/src/syncTcpConnection.cpp @@ -66,10 +66,18 @@ void SyncTcpConnection::Send(std::string message) boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } + +#if BOOST_VERSION >= 107000 +SyncTcpConnection::SyncTcpConnection(const boost::asio::executor& executor) + : socket_(executor) +{ +} +#else SyncTcpConnection::SyncTcpConnection(boost::asio::io_service& io_service) : socket_(io_service) { } +#endif void SyncTcpConnection::handle_write(const boost::system::error_code& /*error*/, size_t /*bytes_transferred*/) |