Re: UDP packets dropping
- From: VJ <v@xxxxxxx>
- Date: Fri, 10 Nov 2006 15:24:01 +0100
Guddu wrote:
Hi,
I am facing a problem which anyone who has worked on any UDP
application might have faced.
UDP by itself is unreliable. If packets are lost, no acknowledgements
are sent.
I have a UDP application which is receiving packets on a standard port.
It receives packets asynchronously. At any time any packet can arrive.
The problem is that sometimes a number of packets arrive and our UDP
socket buffer ( being of finite size ) is not able
to handle them and simply drops the packet.
The UDP socket buffer cannot be increased beyond a finite size(
dynamically it cannot be increased, it is fixed for an OS) .
So a number of packets simply drop with out any intimation to the
receiver/sender.
I need to have checkpoint ( some kind of intimation ) that the packets
are being dropped.
You can add some information to UDP packets, like for example number of packets. If a packet is droped, you will know by tracking packet numbers received.
But keep in mind the order can be mixed
I have implemented polling with poll parameter as POLLIN or
POLLRDNORM.( I have tried both parameters)
Both implementation works that is gives me a poll status implying
socket buffer is full.
In my test set up I can control the rate at which packets are
generated.
When the packets are sent at a very high rate and my socket buffer is
not able to handle them, polling status tells me that
buffer is full.
when the rate of sending packets is slow, I get an intimation that
buffer space is available.
But in some cases ( when the rate of sending packets is slow ), I get a
poll status that buffer is full ( which is wrong ). Even though
these are corner cases but it made me think.( and caused worry) .
So, your mechanism does not work :P
I have following queries..
a) Do we have any mechanism/ way in which we can find that udp socket
buffer is full and packets are being dropped.
I think there are no such things (not sure though)
b) Can polling be actually be used. My corner cases made me think that.
Is my approach totally wrong.
c) If not Polling then what ?
Can try with packet numbers as I explained
.
- Prev by Date: Re: How to find the number of unsed sectors?
- Next by Date: Re: polling
- Previous by thread: polling
- Next by thread: Re: UDP packets dropping
- Index(es):
Relevant Pages
|