[lkml]   [1996]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: SO_SNDBUF makes select() hang
On Sat, 27 Jul 1996, Mr. Jolt Cola wrote:

> > > Hm, while playing with setting SO_SNDBUF through setsockopt() I noticed
> > > this behavior: if SO_SNDBUF is set low (I was trying 128) then select()
> > > won't ever show the socket as available for writing.
> >
> > We handle our send/receive buffers as including header sizes (ie sk_buff
> > struct overhead) and the like. That means setting ultra low values won't
> > work nicely for all sorts of pathalogical cases.
> For cases like this, why not have setsockopt() return -EINVAL. Breaking
> the code there is better than a infite block.

Or reset the buffer size to a larger size? Currently if you set sndbuf <
256 it gets reset to 256; if the network code behaves badly at this size,
why not raise it to 4096 (or whatever...) ?

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."

-- Bjarne Stroustrup on C++

 \ /
  Last update: 2005-03-22 13:38    [W:0.100 / U:0.072 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site