UDP packet receiving

Discussion in 'C#' started by ge444, Aug 30, 2010.

  1. ge444

    ge444 New Member

    Joined:
    Aug 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Greetings i am making an UDP sending/receiving program

    while sending and receiving works all great... my problem is that from several servers i receive multiple packets, the response of these servers is separated into parts in different packets that come one after another... here are my problems:

    1) if i put a thread and inside the thread an infinite loop to receive packets, my applications stacks and lags badly.

    2)putting the receive buffer function many times, is simply bad solution.


    I believe i could use some kind of a variable inside a loop to control the looping... Like for example do{} while still receiving packets or something... I really have no idea.. I am new to C# but i am an average, i have done java and some C in the past.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice