我使用Android手机上的Webservice上传图片。我不需要代码或任何你的工作但只是我想知道什么是SocketTimeoutException ..不是所有的时间只有几次我在Logcat中得到以下异常。
这是服务器端sockettimeout的意思,还是可能是由于我的移动网络问题,而且无法长时间访问。
java.net.SocketTimeoutException:在180000ms之后无法连接到www.myserver.com/(端口443):isConnected失败:libcore.io.IoBridge.isConnected上的ETIMEDOUT(连接超时)(IoBridge.java:232)在libcore.io.IoBridge.connectErrno(IoBridge.java:171)的libcore.io.IoBridge.connect(IoBridge.java:122)java.net的java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)。来自com.android.okhttp的com.android.okhttp.internal.Platform.connectSocket(Platform.java:117)的java.net.Socket.connect(Socket.java:884)中的PlainSocketImpl.connect(PlainSocketImpl.java:452) .internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)位于com.android.okhttp.Connection.connect(Connection.java)的com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:79) :143)at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)at com.android.okhttp.OkHttpClient $ 1.connectAndSetOwner(OkHttpClient.java:128)at com.android.okhttp.internal.http.HttpEngine .N在com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)的com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)中的extConnection(HttpEngine.java:341) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)at com.android.okhttp.internal .huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:245)at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl .java)at java.lang.Thread.run(Thread.java:818)引起:android.system.ErrnoException:isConnected failed:libcore.io.IoBridge.isConnected的ETIMEDOUT(连接超时)(IoBridge.java:223 )... 26更多::