UdpClient performance

musla

Newcomer
Joined
Feb 12, 2004
Messages
1
Hi all,

My problem is that I am using an UDPClient to recieve UDP packets (few hundred per minute). Each packet is numbered so that I can keep track of how many packets I am losing. If I just look at the number of each packet and nothing else, I dont lose any. But If I read the whole package I start losing alot of them. (ca one out of ten).

Meanwhile the CPU usage is just 13-16%.

Is this a buffering issue?
 
basic question : are you sure that you fork to a new thread when you read the packet ?
You should process the packet in a parallel thread directly after you've received it.
That way you can go back to listen your UDP port as quick as possible.
 
Back
Top