Re: High performance UDP Listener?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: gregory_may (None)
Date: 10/01/04


Date: Fri, 1 Oct 2004 09:54:13 -0700

Processing is probably 50 Ms or so, its pretty quick. I will check out the
QueueUserWorkItem you mentioned. I dont expect I should ever have more than
2-3 threads processing at once.

The other article you mentioned (From my previous post) gave an outline of
using the threadpool, I will give it a try:
http://www.yoda.arachsys.com/csharp/threads/

Thanks!

"Dan Kelley" <DanKelley@discussions.microsoft.com> wrote in message
news:A910F0E2-616A-4EA4-82EB-95C4666BB340@microsoft.com...
>I did something very similar before with MSMQ. Does it take much time to
> process the incoming UDP requests? If not, you could listen on one thread,
> as
> you said, and simply pass the request to the ThreadPool, using the
> QueueUserWorkItem method. If it does take a long time to process a
> request, I
> would not advise using the threadpool as it could become starved quickly.
> In
> this scenario, either create new Thread objects manually (which is the
> quick
> option, but could degrade performance if you have too many threads running
> at
> once, leading to too many context switches), or grab the source for one of
> the many custom thread pools out there.
>
> Hope this helps.
> Dan
>
> "gregory_may" wrote:
>
>> I am working on an application that needs a high performance UDP
>> Listener.
>>
>> Currently I have one thread listening to the network and handling the
>> requests. Currently I need about 70 MS between packets so I dont drop
>> anything.
>>
>> I think I need one thread listening to the network and another thread
>> handling requests. I dont know if I would need an "array queue" to hold
>> the messages or if I could just use the RaiseEvent signal to notify the
>> worker thread to process the inbound message.
>>
>> Anyone seen a code sample/article that could help me out?
>>
>> g.
>>
>>
>>



Relevant Pages

  • Re: output.c error in multithreaded program
    ... Dont forget there are several processes ... type C requests in a type C queue. ... But using thread priorities to try to implicitly ... say I wanted the stock price ...
    (microsoft.public.vc.mfc)
  • Re: So telling
    ... >> Two stories in the Guardian today, one with a legal theme, seemed to me ... >> I have some sympathy for the view that some requests, ... Dont be fooled, frivolous = those the government dont want to release. ...
    (uk.legal)
  • Re: microsoft office outlook 2007
    ... As for migrating data see; ... Please Reply to Newsgroup for the benefit of others ... Requests for assistance by email can not and will not be acknowledged. ... Just dont know what to do or what happened ...
    (microsoft.public.windows.vista.general)
  • Re: Help I lost all my favorites
    ... Requests for assistance by email can not and will not be acknowledged. ... I had really important information in there and I dont know where it all went. ... This is what I have tried, I went to restore to an earlier time then they all came back, but then my anti-virus renewal was gone, so I reinstalled that, then my favorites were all gone again. ...
    (microsoft.public.windows.vista.file_management)
  • Proxy credentials advice needed
    ... behind Proxy servers are not able to use the app. ... I dont know how I should handle this. ... credentials from the user and store it locally? ... that makes web requests, needs to handle this for itself... ...
    (microsoft.public.dotnet.languages.csharp)