Class NetUtils
java.lang.Object
com.biglybt.core.util.NetUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static booleanprivate static List<NetworkInterface> private static intprivate static List<NetworkInterface> private static booleanprivate static final intprivate static final intprivate static longprivate static final int(package private) static final AESemaphoreprivate static final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidBest effort strategy of querying network interfaces by common names.private static voidBest effort strategy of querying network interfaces by guessing OS assigned index.static NetworkInterfacegetByInetAddress(InetAddress addr) static NetworkInterfaceprivate static NetworkInterfacegetBySupport(Object name_or_address) static InetAddressstatic List<NetworkInterface> static List<NetworkInterface> getNetworkInterfaces(boolean up_only) private static Enumeration<NetworkInterface> Calls NetworkInterface.getNetworkInterface, tries to recover from SocketException on some Android devices
-
Field Details
-
MIN_NI_CHECK_MILLIS
private static final int MIN_NI_CHECK_MILLIS- See Also:
-
INC1_NI_CHECK_MILLIS
private static final int INC1_NI_CHECK_MILLIS- See Also:
-
INC2_NI_CHECK_MILLIS
private static final int INC2_NI_CHECK_MILLIS- See Also:
-
current_check_millis
private static int current_check_millis -
last_ni_check
private static long last_ni_check -
current_all_interfaces
-
current_up_interfaces
-
first_check
private static boolean first_check -
check_in_progress
private static boolean check_in_progress -
ni_sem
-
host_or_address_map
-
RESULT_NULL
-
-
Constructor Details
-
NetUtils
public NetUtils()
-
-
Method Details
-
getNetworkInterfaces
- Throws:
SocketException
-
getNetworkInterfaces
- Throws:
SocketException
-
getLocalHost
- Throws:
UnknownHostException
-
getByName
- Throws:
SocketException
-
getByInetAddress
- Throws:
SocketException
-
getBySupport
- Throws:
SocketException
-
NetworkInterface_getNetworkInterfaces
private static Enumeration<NetworkInterface> NetworkInterface_getNetworkInterfaces() throws SocketExceptionCalls NetworkInterface.getNetworkInterface, tries to recover from SocketException on some Android devices- Throws:
SocketException
-
collectNetworkInterfacesByIndex
Best effort strategy of querying network interfaces by guessing OS assigned index. There's no guarantee of finding all interfaces, or stability across reboots. -
collectNetworkInterfacesByCommonNames
Best effort strategy of querying network interfaces by common names. -
getTestDomains
-