LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2254|回复: 0

ioctl(..FIONREAD..)为什么结果总是0?

[复制链接]
发表于 2006-1-14 14:42:13 | 显示全部楼层 |阅读模式
我想用函数
numPending()
{   
    size_t len;
   
    if (ioctl( sockNum, FIONREAD, (char *)&len ) < 0)
        throw StreamException("numPending");
   
    return (int)len;
}
测网络连接的可读量 或文件的可读量,但结果总是0
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表