Commit e00bb03b authored by ufownl's avatar ufownl

Fix compatible problems with ASIO in boost 1.66

parent 60e58f5d
...@@ -52,6 +52,10 @@ using asio_tcp_socket = boost::asio::ip::tcp::socket; ...@@ -52,6 +52,10 @@ using asio_tcp_socket = boost::asio::ip::tcp::socket;
/// Low-level socket type used as default. /// Low-level socket type used as default.
using asio_tcp_socket_acceptor = boost::asio::ip::tcp::acceptor; using asio_tcp_socket_acceptor = boost::asio::ip::tcp::acceptor;
class multiplexer_backend : public io_service {
// nop
};
/// A wrapper for the boost::asio multiplexer /// A wrapper for the boost::asio multiplexer
class asio_multiplexer : public multiplexer { class asio_multiplexer : public multiplexer {
public: public:
...@@ -86,14 +90,14 @@ public: ...@@ -86,14 +90,14 @@ public:
void run() override; void run() override;
boost::asio::io_service* pimpl() override; multiplexer_backend* pimpl() override;
inline boost::asio::io_service& service() { inline boost::asio::io_service& service() {
return service_; return service_;
} }
private: private:
io_service service_; multiplexer_backend service_;
}; };
template <class T> template <class T>
......
...@@ -308,7 +308,7 @@ void asio_multiplexer::run() { ...@@ -308,7 +308,7 @@ void asio_multiplexer::run() {
CAF_RAISE_ERROR(ec.message()); CAF_RAISE_ERROR(ec.message());
} }
boost::asio::io_service* asio_multiplexer::pimpl() { multiplexer_backend* asio_multiplexer::pimpl() {
return &service_; return &service_;
} }
......
...@@ -37,16 +37,12 @@ ...@@ -37,16 +37,12 @@
#include "caf/io/network/protocol.hpp" #include "caf/io/network/protocol.hpp"
#include "caf/io/network/native_socket.hpp" #include "caf/io/network/native_socket.hpp"
namespace boost {
namespace asio {
class io_service;
} // namespace asio
} // namespace boost
namespace caf { namespace caf {
namespace io { namespace io {
namespace network { namespace network {
class multiplexer_backend;
/// Low-level backend for IO multiplexing. /// Low-level backend for IO multiplexing.
class multiplexer : public execution_unit { class multiplexer : public execution_unit {
public: public:
...@@ -136,7 +132,7 @@ public: ...@@ -136,7 +132,7 @@ public:
/// Retrieves a pointer to the implementation or `nullptr` if CAF was /// Retrieves a pointer to the implementation or `nullptr` if CAF was
/// compiled using the default backend. /// compiled using the default backend.
virtual boost::asio::io_service* pimpl(); virtual multiplexer_backend* pimpl();
inline const std::thread::id& thread_id() const { inline const std::thread::id& thread_id() const {
return tid_; return tid_;
......
...@@ -28,16 +28,12 @@ multiplexer::multiplexer(actor_system* sys) : execution_unit(sys) { ...@@ -28,16 +28,12 @@ multiplexer::multiplexer(actor_system* sys) : execution_unit(sys) {
// nop // nop
} }
boost::asio::io_service* pimpl() {
return nullptr;
}
multiplexer_ptr multiplexer::make(actor_system& sys) { multiplexer_ptr multiplexer::make(actor_system& sys) {
CAF_LOG_TRACE(""); CAF_LOG_TRACE("");
return multiplexer_ptr{new default_multiplexer(&sys)}; return multiplexer_ptr{new default_multiplexer(&sys)};
} }
boost::asio::io_service* multiplexer::pimpl() { multiplexer_backend* multiplexer::pimpl() {
return nullptr; return nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment