diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 241994e7c..2ab1093c2 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -1080,12 +1080,6 @@ namespace aux { int m_outstanding_router_lookups = 0; #endif - void send_udp_packet_hostname_deprecated(char const* hostname - , int port - , span p - , error_code& ec - , int flags); - void send_udp_packet_hostname(std::weak_ptr sock , char const* hostname , int port @@ -1104,12 +1098,6 @@ namespace aux { send_udp_packet_hostname(s->udp_sock, hostname, port, p, ec, flags); } - void send_udp_packet_deprecated(bool ssl - , udp::endpoint const& ep - , span p - , error_code& ec - , int flags); - void send_udp_packet(std::weak_ptr sock , udp::endpoint const& ep , span p diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 1b99d9fb1..94179b5e6 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -2316,25 +2316,6 @@ namespace { } #endif - void session_impl::send_udp_packet_hostname_deprecated(char const* hostname - , int const port - , span p - , error_code& ec - , int const flags) - { - // for now, just pick the first socket with a matching address family - // TODO: remove this function once all callers are updated to specify a socket - for (auto& i : m_listen_sockets) - { - if (!i.udp_sock) continue; - if (i.ssl) continue; - - send_udp_packet_hostname(i.udp_sock, hostname, port, p, ec, flags); - return; - } - ec = boost::asio::error::operation_not_supported; - } - void session_impl::send_udp_packet_hostname(std::weak_ptr sock , char const* hostname , int const port @@ -2363,28 +2344,6 @@ namespace { } } - void session_impl::send_udp_packet_deprecated(bool const ssl - , udp::endpoint const& ep - , span p - , error_code& ec - , int const flags) - { - // for now, just pick the first socket with a matching address family - // TODO: 3 for proper multi-homed support, we may want to do something - // else here. Probably let the caller decide which interface to send over - for (auto& i : m_listen_sockets) - { - if (i.ssl != ssl) continue; - if (!i.udp_sock) continue; - if (i.local_endpoint.address().is_v4() != ep.address().is_v4()) - continue; - - send_udp_packet(i.udp_sock, ep, p, ec, flags); - return; - } - ec = boost::asio::error::operation_not_supported; - } - void session_impl::send_udp_packet(std::weak_ptr sock , udp::endpoint const& ep , span p