IPv6 Socket on Android
I am trying to create an IPv6 TCP connection between two Android devices. However creating the socket always fails. If I instantiate it like this: Inet6Address dest = (Inet6Address) InetAddress.getByName(addressString); Socket socket = new Socket(dest, portNumber); I get the following exception: java.net.ConnectException: failed to connect to *address* (port *portNumber*): connect failed: EINVAL (Invalid argument) If I instead instantiate my IPv6Address object like this: Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); NetworkInterface wifiInterface =