Hi, SocketChannel sockChannel = SocketChannel.open(); sockChannel.configureBlocking(false); sockChannel.connect(new InetSocketAddress(remoteAddr, remotePort));
Connect is taking 30ms to 50ms sometimes more than 100ms on Android version 2.3.4 and 3.2.1. I have executed several tests on two hardwares and it is always that slow. I was hoping that it takes less than 2-3 ms since it is non- blocking. Is this a known issue ? I am using Selector to select over the 10s of SocketChannels for SelectionKey.OP_CONNECT. Selector.select uses a timeout of 100ms in this case but overall time taken is more than 1 second which is mostly because of the SocketChannel.connect. Is there any alternative to avoid the problem of SocketChannel.connect and still achieve to finish the selector in 100ms. Thanks Alex -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en