UDP concept help please

Discussion in 'C Programming' started by person, Oct 26, 2005.

  1. person

    person Guest

    Hi,

    I'm trying to write a program to capture a torrent of UDP messages.
    The way I understand it, UDP is an unreliable protocol and packets can
    be lost. However, I want to maximize the amount of traffic I capture
    from the port. My first idea was to have a process with one thread
    that just watched the port and stuffed each UDP message into a message
    queue. Another thread in the same process would fetch messages from
    the queue and do whatever with it.

    This idea performed so poorly that I have to conclude it was a bad
    idea. Does anyone on the list do this sort of thing? Does anyone have
    an idea about how to do this, that they're willing to share?

    Any help here will be greatly appreciated! I'm using gnu c running in
    the cygwin environment on w2k platform.

    Thanks,
    Frank
    person, Oct 26, 2005
    #1
    1. Advertising

  2. person

    Jordan Abel Guest

    On 2005-10-26, person <> wrote:
    > I'm trying to write a program to capture a torrent of UDP messages.
    > The way I understand it, UDP is an unreliable protocol and packets can
    > be lost. However, I want to maximize the amount of traffic I capture
    > from the port. My first idea was to have a process with one thread
    > that just watched the port and stuffed each UDP message into a message
    > queue. Another thread in the same process would fetch messages from
    > the queue and do whatever with it.


    If packets are lost it will probably be because of network conditions [line
    noise, transmission errors, etc] not because you didn't pick them up in time as
    you seem to think
    Jordan Abel, Oct 26, 2005
    #2
    1. Advertising

  3. person <> wrote:

    > I'm trying to write a program to capture a torrent of UDP messages.
    > The way I understand it, UDP is an unreliable protocol and packets can
    > be lost. However, I want to maximize the amount of traffic I capture
    > from the port. My first idea was to have a process with one thread
    > that just watched the port and stuffed each UDP message into a message
    > queue. Another thread in the same process would fetch messages from
    > the queue and do whatever with it.


    (Oops, wrong group. I suggest comp.unix.programmer.)

    Your post is off-topic for comp.lang.c. Please visit

    http://www.ungerhu.com/jxh/clc.welcome.txt
    http://www.eskimo.com/~scs/C-faq/top.html
    http://benpfaff.org/writings/clc/off-topic.html

    for posting guidelines and frequently asked questions. Thank you.

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
    Christopher Benson-Manica, Oct 26, 2005
    #3
  4. person

    person Guest

    Thank you Jordan!:)
    person, Oct 26, 2005
    #4
  5. person

    person Guest

    okay
    person, Oct 26, 2005
    #5
  6. person

    Barry Guest

    OT Re: UDP concept help please

    "person" <> wrote in message
    news:...
    > Hi,
    >
    > I'm trying to write a program to capture a torrent of UDP messages.
    > The way I understand it, UDP is an unreliable protocol and packets can
    > be lost. However, I want to maximize the amount of traffic I capture
    > from the port. My first idea was to have a process with one thread
    > that just watched the port and stuffed each UDP message into a message
    > queue. Another thread in the same process would fetch messages from
    > the queue and do whatever with it.
    >
    > This idea performed so poorly that I have to conclude it was a bad
    > idea. Does anyone on the list do this sort of thing? Does anyone have
    > an idea about how to do this, that they're willing to share?
    >
    > Any help here will be greatly appreciated! I'm using gnu c running in
    > the cygwin environment on w2k platform.
    >
    > Thanks,
    > Frank
    >


    OT - but you could google winpcap
    Barry, Oct 26, 2005
    #6
  7. person

    Default User Guest

    person wrote:

    > okay


    Okay, what?



    Brian

    --
    Please quote enough of the previous message for context. To do so from
    Google, click "show options" and use the Reply shown in the expanded
    header.
    Default User, Oct 26, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KK
    Replies:
    2
    Views:
    498
    Big Brian
    Oct 14, 2003
  2. Torsten Rueger

    udp broadcast example, please

    Torsten Rueger, Dec 17, 2003, in forum: Python
    Replies:
    2
    Views:
    2,100
    Matthias Baas
    Dec 20, 2003
  3. Jp Calderone

    Re: udp broadcast example, please

    Jp Calderone, Dec 17, 2003, in forum: Python
    Replies:
    0
    Views:
    687
    Jp Calderone
    Dec 17, 2003
  4. George
    Replies:
    4
    Views:
    283
    John Hazen
    Sep 27, 2005
  5. Replies:
    2
    Views:
    449
    Kai-Uwe Bux
    May 15, 2008
Loading...

Share This Page