title: java.net.ConnectException: Connection refused: connect java nio
body: <pre><code>**java.net.ConnectException: Connection refused: connect
      at sun.nio.ch.Net.connect0(Native Method)
      at sun.nio.ch.Net.connect(Net.java:454)
      at sun.nio.ch.Net.connect(Net.java:446)
      at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
  </code></pre>
  
  <p>I have this exception when i use socketchannel between two pcs on the same local network strong text .. but when i use on the same PC is connects and send bytes without any exception..any help?</p>
  
  <pre><code>the error happens when calling connect(socketAddress);
  
      **socketChannel.connect(socketAddress);****
  </code></pre>