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

  • Home
  • SEARCH
  • 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 8153239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:57:09+00:00 2026-06-06T15:57:09+00:00

i got some legacy code using: nonblocking socket, select for timeout, read (2) and

  • 0

i got some legacy code using: nonblocking socket, select for timeout, read(2) and write(2).
Now it occasionally failed due to select/1024 fd limits. so i need to replace the select.

It seems RCVTIMEO and SNDTIMEO can also check timeout but they work for blocking mode, and it impacts too much to change from non-blocking to blocking.

So is there any other best practice to check timeout for nonblocking socket(no select)? Or i have to get some timer/nanosleep to solve this?

  • 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-06T15:57:11+00:00Added an answer on June 6, 2026 at 3:57 pm

    poll() is essentially a drop-in replacement for using select(), but does not have the 1024 file descriptor limit. You will have to change your code slightly to create an array of struct pollfd structures instead of using fd_sets, but the overall structure of the code should not have to change.

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

Sidebar

Related Questions

I've got to write some code for a legacy application that is still running
I'm trying to write some Elisp code to format a bunch of legacy files.
I've got some (legacy) code that I'm building with clang for the first time.
Ok, so I've got some legacy code from another company that I have to
Interfacing with legacy code, and I've got something like this: Event.observe(some_form, 'submit', [some anonymous
I've got some legacy code in C++ here that does some things I don't
I am using for some legacy db the corresponding domainclasses with mappings. Now the
I got some legacy code that has this: <?PHP if(isset($_GET['pagina'])==homepage) { ?> HtmlCode1 <?php
We've got an app with some legacy printer setup code that we are still
I've got some legacy code that I really don't have time to rewrite. Is

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.