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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:27:24+00:00 2026-06-04T08:27:24+00:00

At first, I must ask that which is the best in which states ?

  • 0

At first, I must ask that which is the best in which states ? For example a real-time MMORPG server. What if i create a thread per client instead of using non-blocking sockets ? Or What if i use one thread that contains all non-blocking sockets ? Can you explain me the advantages ?

  • 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-04T08:27:26+00:00Added an answer on June 4, 2026 at 8:27 am

    Your question deserves a much longer discussion but here’s a short stab at an answer:

    • using blocking sockets means that only one socket may be active at any time in any one thread (because it blocks while waiting for activity)
    • using blocking sockets is generally easier than non-blocking sockets (asynchronous programming tends to be more complicated)
    • you could create 1 thread per socket as you stated but threads have overhead and are extremely inefficient compared to the non-blocking solutions;
    • with non-blocking sockets you could handle a much larger volume of clients: it could scale to hundreds of thousands in a single process – but the code becomes a little bit more complicated

    With non-blocking sockets (on Windows) you have a couple of options:

    • polling
    • events based
    • overlapped I/O

    Overlapped I/O will give you the best performance (thousands of sockets / process) at the expense of being the most complicated model to understand and implement correctly.

    Basically it comes down to performance vs. programming complexity.

    NOTE

    Here’s a better explanation of why using a thread/socket model is a bad idea:

    In windows, creating a large number of threads is highly inefficient because the scheduler is unable to properly determine which threads should be receiving processor time and which shouldn’t. That coupled with the memory overhead of each thread means that you will run out of memory (because of stack space) and processor cycles (because of overhead in managing threads) at the OS level long before you will run out of capacity to handle socket connections.

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

Sidebar

Related Questions

First I must say that I'm not good at English and completely new to
Google App Engine says Must authenticate first. while trying to deploy any app: me@myhost
Well, first of all sorry about this question it must be pretty straight forward
first of all, sorry if that question is dumb but I´m a total newbie
This question will undoubtedly be difficult to answer and ask in a way that
-- I am to write a program that prompts for N which is number
Is there a function built into Java that capitalizes the first character of each
I must be missing something simple, but I can't see it. First, the setup:
My task Create a UserControl which should be able to contain any visual child
I somehow must have overlooked the tell, don't ask OOP principle all these years

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.