How can I set the socket buffer size for a UNIX socket file descriptor in C? I understand setsockopt is probably the system call involved... Can anyone give an example of how to use it, the one's I have found do not explain how to set the buffer size?
Asked
Active
Viewed 905 times
0
-
What is wrong with the defaults – Ed Heal Sep 25 '14 at 21:26
-
1You found examples of how to set the socket buffer size that don't explain how to set the socket buffer size? – user207421 Sep 25 '14 at 22:27
-
@EJP - yeah, exactly. It's one call, [Clarkson], how hard can it be? – Martin James Sep 25 '14 at 23:21
-
Googling 'UNIX setbuffersize': 'About 24,400 results'. – Martin James Sep 25 '14 at 23:25
-
nevermind figured it out, @EJP- I found how to use setsockopt() not how to set socket buffer size. Anyhow accepting TonyB's answer. – tsar2512 Sep 26 '14 at 01:33
1 Answers
0
On Ubuntu 14.04 Linux check out man 7 socket
, and specifically look at SO_RCVBUF
and SO_SNDBUF
.

TonyB
- 927
- 6
- 13