diff --git a/libs/asiotap/include/asiotap/types/ip_endpoint.hpp b/libs/asiotap/include/asiotap/types/ip_endpoint.hpp index 322a1b06..de63aded 100644 --- a/libs/asiotap/include/asiotap/types/ip_endpoint.hpp +++ b/libs/asiotap/include/asiotap/types/ip_endpoint.hpp @@ -226,9 +226,12 @@ namespace asiotap template inline void async_resolve(const base_ip_endpoint& ep, typename base_ip_endpoint::resolver& resolver, typename base_ip_endpoint::resolver::protocol_type protocol, typename base_ip_endpoint::resolver::query::flags flags, const std::string& default_service, typename base_ip_endpoint::handler handler) { - typename base_ip_endpoint::resolver::query query(protocol, ep.address().to_string(), ep.has_port() ? boost::lexical_cast(ep.port()) : default_service, flags); - + static_cast(flags); + static_cast(protocol); + typename base_ip_endpoint::resolver::query query(ep.address().to_string(), ep.has_port() ? boost::lexical_cast(ep.port()) : default_service, boost::asio::ip::resolver_query_base::numeric_host); + resolver.async_resolve(query, handler); + return; } /** diff --git a/libs/fscp/include/fscp/server.hpp b/libs/fscp/include/fscp/server.hpp index 2b18a595..bb97c283 100644 --- a/libs/fscp/include/fscp/server.hpp +++ b/libs/fscp/include/fscp/server.hpp @@ -1300,7 +1300,7 @@ namespace fscp void async_send_to(const SharedBuffer& data, const size_t size, const ep_type& target, simple_handler_type handler) { const void_handler_type write_handler = [this, data, size, target, handler] () { - m_socket.async_send_to(buffer(data, size), target, 0, [data, handler] (const boost::system::error_code& ec, size_t) { + m_socket.async_send_to(buffer(data, size), to_socket_format(target), 0, [data, handler] (const boost::system::error_code& ec, size_t) { handler(ec); }); }; diff --git a/libs/fscp/src/server.cpp b/libs/fscp/src/server.cpp index 62b92dca..e419f9ec 100644 --- a/libs/fscp/src/server.cpp +++ b/libs/fscp/src/server.cpp @@ -1069,7 +1069,7 @@ namespace fscp server::ep_type server::to_socket_format(const server::ep_type& ep) { -#ifdef WINDOWS +#if defined(WINDOWS) || defined(MACINTOSH) if (m_socket.local_endpoint().address().is_v6() && ep.address().is_v4()) { return server::ep_type(boost::asio::ip::address_v6::v4_mapped(ep.address().to_v4()), ep.port()); @@ -1079,8 +1079,6 @@ namespace fscp return ep; } #else - static_cast(ep); - return ep; #endif }