Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Java InputStream函数如何available()用C语言实现?
available()
此函数返回对可以从 InputStream 读取的字节数的估计值,而不会在下一次调用该 InputStream 的方法时阻塞。
查找ioctl(2)功能,FIONREAD选项。
ioctl(2)
FIONREAD