gNash wrote:
> On Aug 17, 8:41 pm, David Schwartz <dav...@webmaster.com> wrote:
>> On Aug 17, 4:42 am, gNash <ganeshamu...@gmail.com> wrote:
>>
>>> so, "UDP buffer all the time hold the latest packet from the network",
>>> am i correct Mr.David ?
>> There is no difference. UDP doesn't care when a packet is received and
>> makes no guarantees about timeliness or order. I think most
>> implementations will drop packets when the receive queue is full. But
> Thanks,
>
>> you can simply flush the receive queue by reading packets until you
>> get a 'would block' indication.
>
> flush, 'would block' indication.. please kindly give me some more
> explanation...
Use select() to see if there's anything available to read. If not that's
a "would block" condition.
|