开发者

Android TCP socket and Streaming. No Errors or exceptions when sending data after conectivty loss

Im trying to determine if data was successfully sent to the server through a TCP socket using the OutputStream object. for testing purposes i disable network communications in the phone and OutputStream.write(); doesn't throw an exception, all the methods in the socket class return as though the socket is active and working. Is there anything i'm doing wrong here?

is there any socket implementation or stream implementation i can use to get an exception or error when the stream / socket doesn't actually send the data in the buffer?

also setting SetSoTimeout() on the socket doesn't seem to do anything开发者_Go百科.

Thanks, Totem


If you're using the emulator this is a known bug, data can still be sent after enabling airplane mode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜