嗨,我是新来的
我在Android手机上有一个客户端,我想连接到Raspberry Pi上的SocketIO服务器。
我接受了这个客户端示例https://github.com/fatshotty/socket.io-java-client/blob/master/examples/basic/BasicExample2.java
我改变了IP地址和端口。当我运行它时,我遇到了这个问题
03-21 11:37:09.469 19973-20232 / com.example.app I / System.out:发生错误
03-21 11:37:09.469 19973-20232 / com.example.app W / System.err:io.socket.SocketIOException:握手时出错
03-21 11:37:09.470 19973-20232 / com.example.app W / System.err:at io.socket.IOConnection.handshake(IOConnection.java:322)
03-21 11:37:09.470 19973-20232 / com.example.app W / System.err:at io.socket.IOConnection.access $ 600(IOConnection.java:39)
03-21 11:37:09.470 19973-20232 / com.example.app W / System.err:at io.socket.IOConnection $ ConnectThread.run(IOConnection.java:199)
03-21 11:37:09.470 19973-20232 / com.example.app W / System.err:引起:java.net.SocketTimeoutException
03-21 11:37:09.471 19973-20232 / com.example.app W / System.err:at java.net.PlainSocketImpl.read(PlainSocketImpl.java:495)
03-21 11:37:09.471 19973-20232 / com.example.app W / System.err:at java.net.PlainSocketImpl.access $ 000(PlainSocketImpl.java:46)
03-21 11:37:09.471 19973-20232 / com.example.app W / System.err:at java.net.PlainSocketImpl $ PlainSocketInputStream.read(PlainSocketImpl.java:240)
03-21 11:37:09.471 19973-20232 / com.example.app W / System.err:at java.io.InputStream.read(InputStream.java:163)
03-21 11:37:09.471 19973-20232 / com.example.app W / System.err:at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:142)
03-21 11:37:09.472 19973-20232 / com.example.app W / System.err:at java.io.BufferedInputStream.read(BufferedInputStream.java:227)
03-21 11:37:09.472 19973-20232 / com.example.app W / System.err:at libcore.io.Streams.readAsciiLine(Streams.java:201)
03-21 11:37:09.472 19973-20232 / com.example.app W / System.err:at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:573)
03-21 11:37:09.472 19973-20232 / com.example.app W / System.err:at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:821)
03-21 11:37:09.472 19973-20232 / com.example.app W / System.err:at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:293)
03-21 11:37:09.472 19973-20232 / com.example.app W / System.err:at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:185)
03-21 11:37:09.473 19973-20232 / com.example.app W / System.err:at io.socket.IOConnection.handshake(IOConnection.java:313)
03-21 11:37:09.473 19973-20232 / com.example.app W / System.err:... 2更多
有人知道我能做什么吗?