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 7957011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:10:22+00:00 2026-06-04T04:10:22+00:00

I have read that working with more than 64 sockets in a thread is

  • 0

I have read that working with more than 64 sockets in a thread is dangerous(?). But -at least for me- Non-blocking sockets are used for avoiding complicated thread things. Since there is only one listener socket, how am i supposed to split sockets into threads and use them with select() ? Should i create fd_sets for each thread or what ? And how am i supposed to assign a client to a thread, since I can only pass values in the beginning with CreateThread() ?

  • 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-04T04:10:25+00:00Added an answer on June 4, 2026 at 4:10 am

    No no no, you got a few things wrong there.

    First, the ideal way to handle many sockets is to have a thread pool which will do the work in front of the sockets (clients).
    Another thread, or two (actually in the amount of CPUs as far as I know), do the connection accepting.

    Now, when a an event occurs, such as a new connection, it is being dispatched to the thread pool to be processed.

    Second, it depends on the actual implementation and environment.
    For example, in Windows there’s something called IOCP.

    If you ask me – do not bother with the lower implementation but instead use a framework such as BOOST::ASIO or ACE.

    I personally like ASIO. The best thing about those frameworks is that they are usually cross-platform (nix, Windows etc’).

    So, my answer is a bit broad but I think it’s to the best that you take these facts into consideration before diving into code/manuals/implementation.

    Good luck!

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

Sidebar

Related Questions

I am working with WCF .NET 3.5 SP1 and have read that one does
Now that I have a read-only application working, I am working on the insert
I have read that you can do it, but would this really improve performance
I have read that LinkedHashMap has faster iteration speed than HashMap because its elements
I have read that most languages are becoming more and more like lisp, adopting
I have read that CURL is way too fast than File Get Contents and
I have read that gwt-ext is slow and it seems too bulky. How does
I have read that 'Normal' ARM instructions are fixed length - 32 bits. And
I have read that to match a word inside of a string using Regular
I have read that viewstate is not there in asp.net MVC application. I am

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.