473,750 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Threadpool and TCP server

Sam
Hi all,

I want to write a multi-threaded TCP/IP server program that can handle
hundreds of connections(say 500) what is the best way to handle these
connection/threadpool? Could someone please give me some directions. The
threadpool in .Net Framework 1.X can give me only 25 active threads per
processor which is very limited and have seen some articles which create new
thread for every connection to a pre-determined limit.

Regards,

Sam
Nov 7 '06 #1
0 735

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
12344
by: Dan Battagin | last post by:
Is there a known bug with the interaction between the HttpWebRequest and the ThreadPool? I current spawn several HttpWebRequest's using BeginGetResponse, and they work for a while, using worker threads from the ThreadPool. However, eventually (relatively quickly) there become fewer and fewer available worker threads in the pool, until there are 0 and a System.InvalidOperationException occurs with the message: "There were not enough free...
5
2759
by: Duane Pressley | last post by:
I'm looking for someone to help me make sense of the results I'm observing when using the ThreadPool class in a COM-Interop scenario. Here's the set up: 1.. A classic ASP page instantiates and calls MethodA on COM+ Class (C1). 2.. MethodA of COM+ class (C1) instantiates and calls MethodB of .NET class (N1). (Note: N1 has been registered using RegASM and is present in the GAC). 3.. MethodB of .NET class (N1) uses the...
11
3368
by: AA | last post by:
Why microsoft make so hard to change the max Pool Size?? I really need to change it to 50, because I'm using delegates with BeginInvoke and I saw that they (delegates) use the ThreadPool, but I saw too that is very complicate to change the ThreadPool size and if I want, I need to use unmanage resources http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=201 If I use unmanage resources my application will not be portable...
3
1985
by: Trebek | last post by:
Hello group: I have a quick question. Background: I have an assembly that is responsible for handling our clients' *requests* (not a webservice/http request per se but our concept of a request -- meaning 'request for our service') thru our webservice. Depending on the type of client request, we may have to contact an outside provider thru a WebRequest/WS-method, DCOM, etc... The way it works currently is to handle
10
8776
by: Lenn | last post by:
Hello, I have always used a certain design pattern for multithreaded Windows app; Start new worker thread from UI thread, use events to notify UI threads when something happens, update UI controls using delegates through .BeginInvoke. I came across some code samples recently where ThreadPool class is used to start new threads. My questions; 1. what's the difference? 2. Any performance benefits?
4
2399
by: Jonathan Howard | last post by:
I am trying to create a page where multiple requests are made to a single webservice. This webservice takes a fair amount of time to process the requests so rather than making the calls one at a time I'd like to create a new thread for each call. I tested this in a stand alone application with no problems at all. My problem is that when I try using the System.Threading.Threadpool class inside the aspx page, nothing happens. I add a...
3
1344
by: Dave | last post by:
Hi, I have a .NET class which uses the .NET threadpool (using QueueUserWorkItem) to create about 8 threads, which do some work while the parent thread waits for them all to complete, which works fine when referenced from a normal EXE. When I reference this DLL in a webservice however, the threads seem to be created one by one in order, rather than at the same time - it is as if there is only one available thread in the ThreadPool and the...
7
5900
by: Sin Jeong-hun | last post by:
Hi. I'm writing a Client/Multi-threaded Server program on Windows Vista. It worked fine on Windows Vista, but when the server ran on Windows XP, I/O operation has been aborted because of either a thread exit or an application request exception randomly occurred at the OnReceive method (asynchronous tcp stream reading). I searched all over the internet and found a post posted few years ago. He had the same problem as me, and he said it
4
2675
by: Simon | last post by:
Hi All, I'm currently developping something where I need to use threads. Here's the basic scenario. I have a WebService requests which need to launch a few threads and wait for them to complete before returning a responses. Bascically, each thread will make a request to our old C++ server and wait for the answer before completing. Also, the WebService request thread will wait until all the server requests thread are completed ( or...
6
1631
by: Ricardo Vazquez | last post by:
Hello everybody, I'm programming a TCP server. During the stress tests I noticed that maybe my socket-receiving thread became deaf after an hour of heavy stress. I think that the reason could be this: The processing of the received messages. Something goes wrong in this processing and the code gets stuck here. As the processing is within the receiving "while" loop, the loop gets also stuck, so that we will never reach again the...
0
8836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9394
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9338
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.