You will never get an error back (or at least, not for that reason).
setsockopt treats the buffer sizes as hints.  If you pass in a number
that is too large, you get the maximum.

David

On Tue, May 02, 2000 at 10:20:55AM -0400, Tuan Hoang wrote:
> Off hand, what's the max that we can set the buffer to
> without getting an error back from setsockopt?
> Something like 256k?
> 
> Tuan
> 
> On Tue, 2 May 2000, Glynn Clements wrote:
> 
> > 
> > Asad Khan Awan wrote:
> > 
> > > I wanted to findout that if i keep sending data to a tcp/ip scoket and on
> > > the receiving side I dont call the receive (or the read) function then what
> > > happnes when the buffer for the socket fills up. I'm talking about the
> > > buffer handeled by the kernel, where data is stored till read function is
> > > called. can i set the size of this buffer using some function.
> > 
> >     int size = ???;
> >     setsockopt(sock_fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size));
> > and
> >     setsockopt(sock_fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));
> > 
> > -- 
> > Glynn Clements <[EMAIL PROTECTED]>

-- 
  David Shaw  |  Chief Architect, Streaming Systems  |  Akamai Technologies
+---------------------------------------------------------------------------+
    [EMAIL PROTECTED]   |   617-250-3028   |   http://www.jabberwocky.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to