加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

NFS客户端库

发布时间:2020-12-14 00:44:16 所属栏目:Linux 来源:网络整理
导读:我正在寻找一些独立的库来访问NFS共享. 我不是在寻找安装共享,只是浏览和访问文件进行阅读. 优先使用简单的API,类似于opendir,scandir,read等的常规POSIX操作. 提前致谢! 解决方法 这是一个链接到这个 NFS client library,但它看起来很有希望,引用: The NF
我正在寻找一些独立的库来访问NFS共享.
我不是在寻找安装共享,只是浏览和访问文件进行阅读.

优先使用简单的API,类似于opendir,scandir,read等的常规POSIX操作.

提前致谢!

解决方法

这是一个链接到这个 NFS client library,但它看起来很有希望,引用:

The NFS client handles only one connection at a time,but no connection takes 
very long. 

Read requests must be for under 8000 bytes. This has to do with packet size. 
You don't want to know. 

Once 256 files are open simultaneously -- by all applications,since the client 
does not discriminate between requests in any way -- file handles begin to be 
overwritten. The client prints an error. 

If the client has problems opening sockets it quits gracefully,including 
returning a message over the socket to the application. The exception is if 
it is given a bad hostname to mount,in which case it just responds with failure 
rather than quitting. 

If the formatting of the code looks messed up,it's because the code was written 
half on a Mac (tab = 4 spaces).

这是另一个链接,可以解释在sourceforge.net同时打开的256个文件的限制,请参阅sourceforge上常见问题解答的B3 …

编辑:这是一个在Stackoverflow发布的关于递归读取一个可以很容易修改为scandir的目录的问题…

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读