Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could you recommend some guides about Epoll on Linux [closed]

Tags:

c++

linux

epoll

I need to know about Epoll On linux System.

Could you recommend manual or guides about epoll library?

need more detailed guides. it's better to have some examples.

help me. and Thank you for reading.

like image 591
Simon Kim Avatar asked Aug 26 '08 02:08

Simon Kim


People also ask

What is a epoll in Linux?

epoll is a Linux kernel system call for a scalable I/O event notification mechanism, first introduced in version 2.5. 44 of the Linux kernel. Its function is to monitor multiple file descriptors to see whether I/O is possible on any of them.

What is epoll in socket programming?

epoll_ctl with EPOLL_CTL_ADD should be called once for each socket. And when epoll_wait is called, it will monitor all the sockets that are added and return only those FDs that have some events to consume.

Why epoll is faster than select?

The main difference between epoll and select is that in select() the list of file descriptors to wait on only exists for the duration of a single select() call, and the calling task only stays on the sockets' wait queues for the duration of a single call.


1 Answers

Here's an introduction to Epoll, a pretty basic tutorial: http://blog.kovyrin.net/2006/04/13/epoll-asynchronous-network-programming/

A more complete example can be found here: https://banu.com/blog/2/how-to-use-epoll-a-complete-example-in-c/

Also, the man pages

like image 168
Ryan Guest Avatar answered Sep 23 '22 04:09

Ryan Guest