一开始以为nio只是基于epoll,后来看了nio use sendfile。现在我完全混淆了这些概念。连我自己都怀疑自己没看懂epoll。 sendfile 必须使用 DMA 吗? nio和epoll有什么关系? nio和sendfile有什么关系? nio是不是同时基于epoll和sendfile?
最佳答案
In the beginning, I thought nio is just based on epoll, but later I read nio use sendfile.
它同时使用两者,但不同时使用。
Must sendfile use DMA?
没有。
What's the relationship between nio and epoll?
当您调用 Selector.select()
时,NIO 会调用 epoll()
和 friend 。
What's the relationship between nio and sendfile?
当您调用 FileChannel.transferTo()/transferFrom()
时,NIO 可能会调用 sendfile()
。
Is nio based on both epoll and sendfile?
是的,在适当的平台上。
关于java - nio、DMA、sendfile和epoll之间有什么关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48090729/