title: When using Android sockets, why would a connection be "actively refused"?
body: <p>I've copy/pasted the code from this <a href="http://thinkandroid.wordpress.com/2010/03/27/incorporating-socket-programming-into-your-applications/" rel="nofollow">tutorial about sockets on Android</a>.</p>
  
  <p>It builds fine and runs as expected, until a connection is attempted.</p>
  
  <p>I've got it connected with USB and I've used ADB to turn on port forwarding.</p>
  
  <p>I've written test apps in C# (which I'm more comfortable with than Java) and I keep getting <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms740668%28v=vs.85%29.aspx#WSAETIMEDOUT" rel="nofollow">error 10061</a>:</p>
  
  <blockquote>
    <p>No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.</p>
  </blockquote>
  
  <p>When I use <a href="http://sockettest.sourceforge.net/" rel="nofollow">SocketTest</a>, I get the following (rather cryptic) message:</p>
  
  <blockquote>
    <p>Connection error: connect</p>
  </blockquote>
  
  <p>I've tried disabling my firewall, but this doesn't help. What could be wrong?</p>