/** * @since Available in iOS 2.0 and later. */ public static SCNetworkReachability create(java.net.InetSocketAddress localAddress, java.net.InetSocketAddress remoteAddress) { long refconId = SCNetworkReachability.refconId.getAndIncrement(); Struct<?> l; Struct<?> r; if (localAddress.getAddress() instanceof java.net.Inet4Address) { l = new sockaddr_in(localAddress); } else if (localAddress.getAddress() instanceof java.net.Inet6Address) { l = new sockaddr_in6(localAddress); } else { throw new IllegalArgumentException("localAddress is not a valid IPv4 or IPv6 address!"); } if (remoteAddress.getAddress() instanceof java.net.Inet4Address) { r = new sockaddr_in(remoteAddress); } else if (remoteAddress.getAddress() instanceof java.net.Inet6Address) { r = new sockaddr_in6(remoteAddress); } else { throw new IllegalArgumentException("remoteAddress is not a valid IPv4 or IPv6 address!"); } SCNetworkReachability reachability = create(null, l, r); reachability.localRefconId = refconId; return reachability; } /**
/** * @since Available in iOS 2.0 and later. */ public static SCNetworkReachability create(java.net.InetSocketAddress address) { long refconId = SCNetworkReachability.refconId.getAndIncrement(); SCNetworkReachability reachability; java.net.InetAddress addr = address.getAddress(); if (addr instanceof java.net.Inet4Address) { reachability = create(null, new sockaddr_in(address)); } else if (addr instanceof java.net.Inet6Address) { reachability = create(null, new sockaddr_in6(address)); } else { throw new IllegalArgumentException("address is not a valid IPv4 or IPv6 address!"); } reachability.localRefconId = refconId; return reachability; } /**
/** * @since Available in iOS 2.0 and later. */ public SCNetworkReachability(java.net.InetSocketAddress localAddress, java.net.InetSocketAddress remoteAddress) { long refconId = SCNetworkReachability.refconId.getAndIncrement(); Struct<?> l; Struct<?> r; if (localAddress.getAddress() instanceof java.net.Inet4Address) { l = new sockaddr_in(localAddress); } else if (localAddress.getAddress() instanceof java.net.Inet6Address) { l = new sockaddr_in6(localAddress); } else { throw new IllegalArgumentException("localAddress is not a valid IPv4 or IPv6 address!"); } if (remoteAddress.getAddress() instanceof java.net.Inet4Address) { r = new sockaddr_in(remoteAddress); } else if (remoteAddress.getAddress() instanceof java.net.Inet6Address) { r = new sockaddr_in6(remoteAddress); } else { throw new IllegalArgumentException("remoteAddress is not a valid IPv4 or IPv6 address!"); } long reachability = create(null, l, r); localRefconId = refconId; setHandle(reachability); } /**
/** * @since Available in iOS 2.0 and later. */ public SCNetworkReachability(java.net.InetSocketAddress localAddress, java.net.InetSocketAddress remoteAddress) { long refconId = SCNetworkReachability.refconId.getAndIncrement(); Struct<?> l; Struct<?> r; if (localAddress.getAddress() instanceof java.net.Inet4Address) { l = new sockaddr_in(localAddress); } else if (localAddress.getAddress() instanceof java.net.Inet6Address) { l = new sockaddr_in6(localAddress); } else { throw new IllegalArgumentException("localAddress is not a valid IPv4 or IPv6 address!"); } if (remoteAddress.getAddress() instanceof java.net.Inet4Address) { r = new sockaddr_in(remoteAddress); } else if (remoteAddress.getAddress() instanceof java.net.Inet6Address) { r = new sockaddr_in6(remoteAddress); } else { throw new IllegalArgumentException("remoteAddress is not a valid IPv4 or IPv6 address!"); } long reachability = create(null, l, r); localRefconId = refconId; setHandle(reachability); } /**
/** * @since Available in iOS 2.0 and later. */ public SCNetworkReachability(java.net.InetSocketAddress address) { long refconId = SCNetworkReachability.refconId.getAndIncrement(); long reachability; java.net.InetAddress addr = address.getAddress(); if (addr instanceof java.net.Inet4Address) { reachability = create(null, new sockaddr_in(address)); } else if (addr instanceof java.net.Inet6Address) { reachability = create(null, new sockaddr_in6(address)); } else { throw new IllegalArgumentException("address is not a valid IPv4 or IPv6 address!"); } localRefconId = refconId; setHandle(reachability); } /**
/** * @since Available in iOS 2.0 and later. */ public SCNetworkReachability(java.net.InetSocketAddress address) { long refconId = SCNetworkReachability.refconId.getAndIncrement(); long reachability; java.net.InetAddress addr = address.getAddress(); if (addr instanceof java.net.Inet4Address) { reachability = create(null, new sockaddr_in(address)); } else if (addr instanceof java.net.Inet6Address) { reachability = create(null, new sockaddr_in6(address)); } else { throw new IllegalArgumentException("address is not a valid IPv4 or IPv6 address!"); } localRefconId = refconId; setHandle(reachability); } /**