Using TFTP in Android, Works fine out of android, Hangs on sendFile in android

删除回忆录丶 提交于 2019-12-12 04:06:16

问题


It all compiles fine and works like a charm, However when i set it up in Android it still compiles fine but when gets to tftp.sendFile it just sits there. I've checked the packets with Wireshark and nothing is being sent.

http://www.java2s.com/Code/Java/Network-Protocol/AsimpleJavatftpclient.htm

What could be the issue here? Spent a few hours debugging and nailed it down to that tftp.sendFile

--

If i let it run for the 60 seconds it just times out with the following

WARN/System.err(2227): Error: I/O exception occurred while sending file. WARN/System.err(2227): Connection timed out.

So its loading the methods fine

EDIT: And i've got "android.permission.INTERNET" in my manifest file.


回答1:


Well, I worked it out, emulator seems to block it, but it works fine on the device.



来源:https://stackoverflow.com/questions/7702987/using-tftp-in-android-works-fine-out-of-android-hangs-on-sendfile-in-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!