remove unused function, has_interface()

This commit is contained in:
arvidn 2017-01-16 09:40:51 -05:00 committed by Arvid Norberg
parent 27001750a4
commit 3b9c65daf1
2 changed files with 0 additions and 15 deletions

View File

@ -179,10 +179,6 @@ namespace libtorrent
return bind_ep.address();
}
// returns true if the given device exists
TORRENT_EXTRA_EXPORT bool has_interface(char const* name, io_service& ios
, error_code& ec);
// returns the device name whose local address is ``addr``. If
// no such device is found, an empty string is returned.
TORRENT_EXTRA_EXPORT std::string device_for_address(address addr

View File

@ -1138,17 +1138,6 @@ namespace libtorrent
return ret;
}
// returns true if the given device exists
bool has_interface(char const* name, io_service& ios, error_code& ec)
{
std::vector<ip_interface> ifs = enum_net_interfaces(ios, ec);
if (ec) return false;
for (int i = 0; i < int(ifs.size()); ++i)
if (ifs[i].name == name) return true;
return false;
}
// returns the device name whose local address is ``addr``. If
// no such device is found, an empty string is returned.
std::string device_for_address(address addr, io_service& ios, error_code& ec)