在Android中使用TFTP,做工精细出的Android,Android的中上挂起SENDFILE [英] Using TFTP in Android, Works fine out of android, Hangs on sendFile in android
问题描述
这一切编译罚款,并得好好的,但是当我将它设置在Android中它仍然编译正常,但当到达tftp.sendFile它只是坐在那里。我检查使用Wireshark数据包,并没有什么被发送。
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 /网络协议/ AsimpleJavatftpclient.htm
这可能是什么问题吗?花了几个小时的调试和钉下来到tftp.sendFile
What could be the issue here? Spent a few hours debugging and nailed it down to that tftp.sendFile
-
如果我让它运行60秒,只是超时以下
If i let it run for the 60 seconds it just times out with the following
WARN / System.err的(2227):错误:我在发送文件时发生/ O异常。
WARN / System.err的(2227):连接超时
WARN/System.err(2227): Error: I/O exception occurred while sending file. WARN/System.err(2227): Connection timed out.
所以它的加载罚款方法
编辑:我已经在我的清单文件中得到了android.permission.INTERNET对
And i've got "android.permission.INTERNET" in my manifest file.
推荐答案
好了,我的工作了,模拟器似乎要禁止它,但它工作正常的设备上。
Well, I worked it out, emulator seems to block it, but it works fine on the device.
这篇关于在Android中使用TFTP,做工精细出的Android,Android的中上挂起SENDFILE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!