下载 URLStream 对象的文件 (URL) 时网络断开时调度的事件
我正在创建一个从服务器下载文件的 AIR 应用程序。 我正在使用带有完整、进度、IOError、安全错误和 HTTP 状态事件的 URLstream 对象。 如果下载过程中网络断开,我不会收到任何事件。 请问谁能告诉我发送了哪个事件?
谢谢, 阿纳哈斯
I am creating an AIR application which downloads file from a server. I am using URLstream object with complete, progress, IOError, security error and HTTP status events. I am not getting an event if the network is disconnected when the download is in progress. Please can anyone tell me which event is dispatched?
Thanks,
Anahas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果网络断开,您应该收到 IOError 事件。 如果您没有收到它,则可能是您没有为该事件添加侦听器,或者您将其添加到了错误的对象上,或者存在框架/Flash bug。
You should get the IOError event in case the network gets disconnected. If you're not getting it, you either didn't add a listener for that event, or you added it on the wrong object, or there's a framework/Flash bug.
AIR 还使用一组单独的事件来传达连接状态。 他们可以监控服务、服务器或只是“连接”(我有网络吗)。 监控网络连接
我同意 bug-但很多情况下,在某些时候您应该收到 IOError 但您可能必须等待超时发生。
There is also a separate set of events that AIR uses to communicate connectivity status. They can monitor services, servers or just "connectivity" ( do I have network ). Monitoring network connectivity
I agree with bug-a-lot though, at some point you should get an IOError but you might have to wait for a timeout to occur.
有没有办法改变使用 urlstream 加载时 IOError 的超时?
有时即使网络已断开,我也不会收到该事件,但它不是很确定。
is there way to change the time-out for IOError while loading using urlstream ?
sometimes even though network is disconnected i dont get the event but its not very definitive.