简体   繁体   中英

what's the relationship among nio, DMA, sendfile and epoll

In the beginning, I thought nio is just based on epoll, but later I read nio use sendfile. Now I am totally confuse with these concepts. Even I doubt I didnot understand epoll. Must sendfile use DMA? What's the relationship between nio and epoll? What's the relationship between nio and sendfile? Is nio based on both epoll and sendfile?

In the beginning, I thought nio is just based on epoll, but later I read nio use sendfile.

It uses both, but not at the same time.

Must sendfile use DMA?

No.

What's the relationship between nio and epoll?

NIO calls epoll() and friends when you call Selector.select() .

What's the relationship between nio and sendfile?

NIO may call sendfile() when you call FileChannel.transferTo()/transferFrom() .

Is nio based on both epoll and sendfile?

Yes, on the appropriate platforms.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM