Wednesday, February 19, 2014
Network Communications HttpURLConnection, Volley and HttpClient not support mobile networks
Wrote a small program communications network in China Unicom 3G, Telecom 3G, WIFI were tested successfully, can take back the server's response.
But the mobile network is more to eat Xiang, and the Request sent, the server can receive and has been processed, but Android has not wait for the server's response, error contents:
ECONNRESET (Connection reset by peer)
Feeling is a mobile phone network has been dynamically changed addresses, or use other means indirectly connected to the network, leading to server Response returns, the original sender address or path was not found.
Internet search a bit reason, some say under CMWAP setting agent, I detected network standard testing machine is CMNET, also set up a proxy tested, unsuccessful! ! ! !
Use HttpUrlConnection testing, others are successful, the move was unsuccessful
Using the Apache HttpClient test, the other successful mobile unsuccessful
Google's Volley test, the other are successful, the move was unsuccessful. . .
Depressed for several days, there is the great God encountered this problem? We look to guidance on January
I could also be the wrong way to complete this requirement is not to convert with other ideas? Only recently started using Android, seeking directions. .<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
BTW, the test machine in the mobile network, micro letters, microblogging and other applications can access, the speed is relatively poor, and will not unresponsive.
Is it to be used SOCKET communication? I just wrote an application thread, the timing for the latest price information from the server using HTTP communication enough, right?
Reply:
Some agents need 2G/3G network is seemingly
Reply:
The problem is that after setting agency under cmnet mode, Android represents a timeout, proxy address 10.0.0.172:80 is not a problem, or do not support http straight?
Another, in the mobile network trial WebView control to open the page without problems.
Reply:
No one knows?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment