To create a scalable multi-user server in C #, which of these two types of servers is more efficient? You can see an example of an asynchronous server using the begin * methods (e.g. beginaccept, beginend) here , and the threadpool implementation here .
I know what threadpool is and how it works, so I pretty much understand how this implementation works. What about an asynchronous server? Does this spawn a thread for every send, receive, and connection event? How effective is it against threadpool?
By efficiency, I mean the overall balance of speed and memory usage.
change
I was asked to use begin () methods, but do they create overhead when they spawn a new thread to take care of a send, receive, or connection event? Or do they end up using some kind of internal threadpool? If not, is there a way to do this so that it uses threadpool or do I just need to collapse my own asynchronous socket server?
source
share