Provide a default ip_change_notifier implementation

Right now, compiling fails if there's no ip_change_notifier for the
current platform.
This commit is contained in:
Tim Niederhausen 2017-10-03 22:11:42 +02:00 committed by Arvid Norberg
parent 7f033fa04b
commit 7e748956e6
1 changed files with 17 additions and 0 deletions

View File

@ -376,6 +376,23 @@ private:
OVERLAPPED m_ovl = {};
boost::asio::windows::object_handle m_hnd;
};
#else
struct ip_change_notifier_impl final : ip_change_notifier
{
explicit ip_change_notifier_impl(io_service& ios)
: m_ios(ios) {}
void async_wait(std::function<void(error_code const&)> cb) override
{
m_ios.post([cb]()
{ cb(make_error_code(boost::system::errc::not_supported)); });
}
void cancel() override {}
private:
io_service& m_ios;
};
#endif
} // anonymous namespace