安卓:什么是"错误的文件数" SocketException? [英] Android: What is a "Bad file number" SocketException?

查看:122
本文介绍了安卓:什么是"错误的文件数" SocketException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到一个SocketException:错误的文件号,同时试图从一个套接字在Android应用阅读,我不知道这意味着什么。我GOOGLE了它,并没有发现它是什么任何解释。有任何想法吗?谢谢你。

I'm getting a "SocketException: Bad file number" while attempting to read from a socket in an Android app and I have no idea what this means. I've googled it and haven't found any explanation of what it is. Any ideas? Thanks.

推荐答案

这通常是底层套接字的结果被关闭。 一把手,是因为文件中的底层C code使用的文件编号处理来识别手柄。该插座可以被你被关闭,但安全性异常,片状网络,它也可能被关闭等。

This is usually the result of the underlying socket being closed. The "number" is because file handles in the underlying C code use file numbers to identify handles. The socket may be closed by you, but it may also be closed by security exceptions, flaky network, etc.

这篇关于安卓:什么是"错误的文件数" SocketException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆