public void run() {
try {
ois = new ObjectInputStream(clientSocket.getInputStream());
Object o;
while ((o = ois.readObject()) != null) {
//do something with object
}
} catch (Exception ex) {
//Log exception
}
}
在Dell Streak上使用Android 2.2.2时,调用socket.shutdowninput()
,shutdownoutput()
,close()
,Thread.interrupt()
都不会抛出异常,任何想法都是如此?