Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.isConnected(IoBridge.java:223)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.connectErrno(IoBridge.java:161)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.connect(IoBridge.java:112)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.net.Socket.connect(Socket.java:833)
- 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)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at java.lang.Thread.run(Thread.java:841)
- 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-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ at libcore.io.IoBridge.isConnected(IoBridge.java:208)
- 11-25 21:04:53.264 4817-4986/com.example.wifidirect.app W/System.err﹕ ... 7 more
- Socket socket = new Socket();
- socket.setReuseAddress(true);
- socket.connect((new InetSocketAddress(info.groupOwnerAddress.getHostAddress(), PORT_GET_IP)), 5000);
- OutputStream os = socket.getOutputStream();
- ObjectOutputStream oos = new ObjectOutputStream(os);
- oos.writeObject(HANDSHAKE_STRING);
- oos.close();
- os.close();
- socket.close();
- ServerSocket serverSocket = new ServerSocket(PORT_GET_IP);
- Socket client = serverSocket.accept();
- ObjectInputStream objectInputStream = new ObjectInputStream(client.getInputStream());
- Object object = objectInputStream.readObject();
- if (object.getClass().equals(String.class) && object.equals(HANDSHAKE_STRING)) {
- otherDeviceINetAddress = client.getInetAddress();
- initClient(client.getInetAddress().toString().substring(1));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement