Re: Architecture advise wanted.

From: William Stacey [MVP] (staceywREMOVE_at_mvps.org)
Date: 08/02/04


Date: Mon, 2 Aug 2004 16:54:52 -0400

Not sure I follow. Why gen an event? Your listener will put the packet
object into the CQueue and Listen again. Your Consumer will wait until the
queue has an object and then go. So you don't need an event unless your
using for some other reason. You can get fancy with no-lock queues and two
lock queues (etc), but in the end I think a one lock blocking queue (not the
Framework queue) is about the best concidering all things and is relatively
easy to verify thread safety'ness and rw memory barrier issues. What is
your arch in more detail? tia

-- 
William Stacey, MVP
"Frank Rizzo" <none@none.com> wrote in message
news:#jmZnYMeEHA.3512@TK2MSFTNGP12.phx.gbl...
> William Stacey [MVP] wrote:
>
> >One way.  Create a listener thread that listens for udp on port n.  It
grabs
> >packets and verifies them, etc and puts them into a queue (blocking
queue,
> >etc.) the stack will queue to some extent then just drop anything new (I
> >think) once the winsock queue is full.  One reason why udp is not
gaurenteed
> >delivery (tcp on the other hand would resend the packet, etc.)  The
client
> >then needs to restransmit if it does not get a response using your own
algo.
> >hth
> >
> >
> Thanks.  That's what I settled on.  The only thing that still bugs is
> that I listen for UDP packets on a different thread (because
> UdpClient.Receive is blocking), then I generate an event that is
> consumed by the calling class.  I am just not sure whether this setup is
> thread-safe.
>
> Thanks.


Relevant Pages

  • Re: Changes in the network interface queueing handoff model
    ... bouncing around for some time is a restructuring of the network interface packet transmission API to reduce the number of locking operations and allow network device drivers increased control of the queueing behavior. ... to "start" output by the driver. ... encapsulation and wrapping, and notifies the hardware. ... The ifnet layer send queue is becoming decreasingly useful over time. ...
    (freebsd-arch)
  • Re: Changes in the network interface queueing handoff model
    ... bouncing around for some time is a restructuring of the network interface packet transmission API to reduce the number of locking operations and allow network device drivers increased control of the queueing behavior. ... to "start" output by the driver. ... encapsulation and wrapping, and notifies the hardware. ... The ifnet layer send queue is becoming decreasingly useful over time. ...
    (freebsd-net)
  • Re: Changes in the network interface queueing handoff model
    ... layer output routine via ifp->if_outputwith the ifnet pointer, packet, ... as ARP), and hands off to the ifnet driver via a call to IFQ_HANDOFF, ... encapsulation and wrapping, and notifies the hardware. ... The ifnet layer send queue is becoming decreasingly useful over time. ...
    (freebsd-arch)
  • Re: Creating a simple windows messaging app
    ... a broker app that receives packets from a canbus and pushes them out to ... each application thread a copy of the packet. ... consists of putting the message into a queue to be sent to the bus (no ... targeted at a specific window. ...
    (microsoft.public.vc.mfc)
  • Re: Performance Intel Pro 1000 MT (PWLA8490MT)
    ... > I used an old version of ttcp for testing. ... A small packet for me is ... > - when the tx queue fills up, the application should stop sending, at ... With polling, it would ...
    (freebsd-performance)

Loading