Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ java.net.ConnectException: failed to connect to /192.168.49.1 (port 7958) after 5000ms: isConnected failed: ECONNREFUSED (Connection refused)
  2. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.isConnected(IoBridge.java:223)
  3. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.connectErrno(IoBridge.java:161)
  4. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.connect(IoBridge.java:112)
  5. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
  6. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460)
  7. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.net.Socket.connect(Socket.java:833)
  8. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at com.yoavst.wifidirectlib.WifiP2P$5.run(WifiP2P.java:237)
  9. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.lang.Thread.run(Thread.java:841)
  10. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ Caused by: libcore.io.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
  11. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.isConnected(IoBridge.java:208)
  12. 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ ... 7 more
  13.  
  14. Socket socket = new Socket();
  15. socket.setReuseAddress(true);
  16. socket.connect((new InetSocketAddress(info.groupOwnerAddress.getHostAddress(), PORT_GET_IP)), 5000);
  17. OutputStream os = socket.getOutputStream();
  18. ObjectOutputStream oos = new ObjectOutputStream(os);
  19. oos.writeObject(HANDSHAKE_STRING);
  20. oos.close();
  21. os.close();
  22. socket.close();
  23.  
  24. ServerSocket serverSocket = new ServerSocket(PORT_GET_IP);
  25. Socket client = serverSocket.accept();
  26. ObjectInputStream objectInputStream = new ObjectInputStream(client.getInputStream());
  27. Object object = objectInputStream.readObject();
  28. if (object.getClass().equals(String.class) && object.equals(HANDSHAKE_STRING)) {
  29. otherDeviceINetAddress = client.getInetAddress();
  30. initClient(client.getInetAddress().toString().substring(1));
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement