forked from premiere/premiere-libtorrent
remove unused function, has_interface()
This commit is contained in:
parent
27001750a4
commit
3b9c65daf1
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue