title: SocketChannel in Android
body: <p>I have a question about SocketChannels in Android. This is my code:</p>
  
  <pre><code>SocketChannel socketChannel = SocketChannel.open();
  socketChannel.connect(new InetSocketAddress("127.0.0.1", 90));
  </code></pre>
  
  <p>This code works in Java but not in Android. I always get an IOException My first problem was the first line. I had to add permissions to open sockets. The first line now works but the second line doesn't. I always get an IOException.</p>
  
  <p>Any suggestions?</p>