Networking Forums

Networking Forums > Computer Networking > Linux Networking > Re: Clear UDP socket kernel buffer.

Reply
Thread Tools Display Modes

Re: Clear UDP socket kernel buffer.

 
 
Joe Beanfish
Guest
Posts: n/a

 
      08-17-2009, 05:31 PM
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get data in kernel SEND buffer for a TCP socket from a netfilter based kernel module Rohit Linux Networking 0 05-10-2007 11:27 AM
flushing a socket buffer soj Linux Networking 3 03-21-2007 04:53 PM
Monitor UDP socket buffer Frederic Mayot Linux Networking 0 03-16-2007 01:57 PM
How to read all data from kernel buffer for a socket fd (which uses TCP ) will_u_tellmemore Linux Networking 0 12-21-2006 01:23 PM
socket buffer size Pirabhu Raman Linux Networking 1 08-18-2004 09:48 PM



1 2 3 4 5 6 7 8 9 10 11