I have a very strange issue with my TCP communication app. I made it a long time ago and I never experienced any problem. It's a simple send & receive packets through a TCP socket.
But I don't know how, this week I ran it on a Samsung Galaxy S5, and I did not succeed in establishing the connection with the server.
serverSocket.connect(new InetSocketAddress(mServerIPV6.getHostAddress(), Network.COMMUNICATION_PORT), (int) (3 * DateUtils.SECOND_IN_MILLIS));
always returns :
java.net.SocketTimeoutException: failed to connect to /fe80::d6ae:5ff:fe43:c6e9%wlan0%23 (port 60001) after 3000ms
but the craziest thing is that it succeed in finding the IP address of the server through the network service discovery (UDP). So the problem does not come from the Wi-Fi network and it only happens with this device (Samsung S5). Very strange. Any idea?