java.net.SocketException : read time out- Android Exception
java.net.SocketException : read time out
I am trying to communicate with devices from android tablet using socket.
If device is connected on right port and i send the command it works fine. but if i remove the device and sent the command to the socket, during socket connection instead of ConnectionRefused Exception (tested on core java program) it waits for approx 1 min and then send SocketTimeoutException.
Can anyone clarify me that why its happening becoz on one activity i am handling 4 devices if one of the devi开发者_开发技巧ce is not connecten then no device will work.
The connection is not actually refused. Your Socket
tries to connect to a device which is not there but the address is valid, so the SocketTimeoutException
.
精彩评论