Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7799861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:26:33+00:00 2026-06-02T00:26:33+00:00

i am new to sockets and i am learning/reading some epoll materials and codes.

  • 0

i am new to sockets and i am learning/reading some epoll materials and codes. My questions is that could epoll totally replace select/poll when epoll is available in system(Linux)?

i think socket programming also should have some paradigms to follow in practice. When i was reading codes, i find some “select” with “epoll”:

  1. a server code use select when it deals with blocking socket. I think epoll(LT) behaves just the same as select so it is ok to use epoll to replace all select.

  2. some legacy code use epoll to monitor. After events returns, select is used on corresponding fd to “check” it just before read/write. i am not quite sure the meaning of this “select”.

i am confused about these “select” code and hope someone can help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:26:35+00:00Added an answer on June 2, 2026 at 12:26 am

    Yes.

    Select, Poll and epoll are all targeting the same need: To wait until a descriptor is ready for read or write, so then one can process the descriptor (reading from it or writing to it).

    epoll is a relative newer implementation and is specific to Linux OS (and therefore, not portable). It has the advantage of returning only the descriptors that are pending without the need to pass all descriptors and check which one caused the system call to return.
    In many cases, epoll is faster then the select or poll.

    Using epoll mixed with select sounds to me like a legacy code that was patched without refactoring the older code. epoll will implement select in a cleaner and faster way (in most cases) and as you mentioned, can work in one of two modes (edge or level ).

    There are some complex instances where an epoll descriptor may be nested in another epoll, implementing a type of hierarchy, but I think it is rare and I personally never saw a code implementation of it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm very interested in learning about the new feature in HTML5 called web sockets.
Ok, I'm fairly new to C sockets but I just need to do some
I'm learning Sockets programming in Java. I'm trying to solve a problem that consists
Ok, I'm still new to using C sockets, but I was wondering if there
I'm kind of new to the .NET platform. And currently I'm learning ASP.NET MVC.
Where could I find good resources and examples for learning how to utilize TCP/IP
I am new to network programming, and have been learning this by writing small
I'm new using sockets. I must implement under linux environment, in user space, the
I am new to Sockets, Working on a project with C# host and Java/Android
I am having problems with making multithreaded Datagram Sockets for learning purposes in java.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.