RE: High performance UDP Listener?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dan Kelley (DanKelley_at_discussions.microsoft.com)
Date: 10/01/04

  • Next message: Alex: "How to check if Mutex is set"
    Date: Fri, 1 Oct 2004 00:59:02 -0700
    
    

    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.
    >
    >
    >


  • Next message: Alex: "How to check if Mutex is set"

    Relevant Pages

    • Re: SW2007 For what it is worth
      ... 50 requests for enhancements etc. ... It has taken a little time for SW to get around to addressing some of ... that SW is actually listening to the user base. ...
      (comp.cad.solidworks)
    • Re: Am I being hacked?
      ... "standard and polite" way to respond when nothing is listening... ... typically an ICMP Destination Unreachable Port Unreachable packet. ... You may be getting incoming pings on other ports and not know it. ... but it's not at all unusual to see ACK or SYN requests used to ...
      (comp.security.firewalls)
    • SW2007 For what it is worth
      ... 50 requests for enhancements etc. ... It has taken a little time for SW to get around to addressing some of ... that SW is actually listening to the user base. ...
      (comp.cad.solidworks)
    • Thread Pool, CWinThread Class and GetQueuedCompletionStatus
      ... I am struggling to convert an ISAPI Extension to thread pooling. ... Completion IO Requests? ... unsuccessfully listening (GetQueuedCompletionStatus) for requests: ...
      (microsoft.public.vc.mfc)
    • Re: Account hacked using Blizzards Password Reset Utility
      ... They are usually used to verify that someone logging onto a network is ... For an effective man-in-the-middle attack, ... from receiving two simultaneous authentication requests, which, if the ...
      (alt.games.warcraft)