title: WiFi direct Connection Failed Error
body: <p>I am newbie in android. I wanted to create sample of P2P. For this i used WifiDirect sample that is provied by google in sdk. I run this sample on device having version 4.2 and I am able to list other devices. Devices get connected via WifiDirect. It shows option for gallery. When I select picture to send to another device , it gives me an error.</p>
  
  <pre><code>   `/wifidirectdemo(12880): failed to connect to /192.168.49.1 (port 8088) after 500ms: isConnected failed: ECONNREFUSED (Connection refused)`
  </code></pre>
  
  <p>While executing this line it gives me error:</p>
  
  <pre><code>socket.connect((new InetSocketAddress(url, port)), SOCKET_TIMEOUT);
  </code></pre>
  
  <p>Please give me an idea or any help to sort it out.</p>
  
  <p>Thanks</p>