Networking Forums

Networking Forums > Computer Networking > Linux Networking > How big is socket receive buffer, and how to control it?

Reply
Thread Tools Display Modes

How big is socket receive buffer, and how to control it?

 
 
C. J. Clegg
Guest
Posts: n/a

 
      04-29-2006, 12:57 PM

If I use send() on one Linux box to send data to a socket on another
Linux box and use recv() to read the data, how large is the buffer on
the destination box, i.e. how much stuff can I send it before it
overflows or blocks and refuses to take any more?

There is a situation where the receiving host may not get around to
reading the data with recv() for a while.

Is there a way to control the size of the receive buffer, perhaps a
configuration parameter or even a change to a header file and a
recompile of the kernel?

Both hosts in this situation are Pentium 4 running Fedora Core 3 with
512 MB RAM.

Thanks...
 
Reply With Quote
 
 
 
 
Maxim Yegorushkin
Guest
Posts: n/a

 
      04-30-2006, 08:58 AM

C. J. Clegg wrote:
> If I use send() on one Linux box to send data to a socket on another
> Linux box and use recv() to read the data, how large is the buffer on
> the destination box, i.e. how much stuff can I send it before it
> overflows or blocks and refuses to take any more?
>
> There is a situation where the receiving host may not get around to
> reading the data with recv() for a while.


Then there is nothing in the receive buffer.

> Is there a way to control the size of the receive buffer, perhaps a
> configuration parameter or even a change to a header file and a
> recompile of the kernel?


man 7 socket
search for SO_SNDBUF and SO_RCVBUF

 
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
Monitor UDP socket buffer Frederic Mayot Linux Networking 0 03-16-2007 01:57 PM
Should I turn ECN on? How to set receive buffer size? buck Linux Networking 0 08-15-2006 06:35 PM
TCP/IP Receive Buffer does not raise a packet received event SimonFitz Windows Networking 0 12-01-2005 05:02 AM
How to set Max UDP Receive Buffer Size and Max UDP Transmit Buffer Size under Windows 2000 and Windows 2003 ? msnews.microsoft.com Windows Networking 0 09-14-2005 07:20 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