Top "Setsockopt" questions

When is TCP option SO_LINGER (0) required?

I think I understand the formal meaning of the option. In some legacy code I'm handling now, the option is …

sockets networking tcp setsockopt so-linger
What is the meaning of SO_REUSEADDR (setsockopt option) - Linux?

From the man page: SO_REUSEADDR Specifies that the rules used in validating addresses supplied to bind() should allow reuse …

linux sockets port ip-address setsockopt
Why changing value of SO_RCVBUF doesn't work?

I'm making a program which create a RAW socket in order to read all traffic. Between the call of socket() …

c sockets buffer setsockopt
Proper use of getsockopt and setsockopt for SO_RCVTIMEO and SO_SNDTIMEO

By various reasons I would like to implement timeout on reading and writing to socket in a server but fail …

c sockets timeout setsockopt
Error "No such device" in call setsockopt when joining multicast group

I have a code in which send multicast datagrams. A critical piece of code: uint32_t port; int sockfd, err_…

c sockets udp multicast setsockopt
TCP_NODELAY not found on Ubuntu

I am trying to disable the Nagle's Algorithm with my TCP sockets on an Ubuntu Linux box by setting the …

c++ sockets setsockopt
Effect of SO_SNDBUF

I am unable to make sense of how and why the following code segments work : /* Now lets try to set …

c linux sockets setsockopt
IP_ADD_MEMBERSHIP on a socket, will the socket listen to unicast also?

Considering the code below, I'm trying to bind a UDP socket for multicast. I've bound it to a specific port, …

c++ sockets udp multicast setsockopt
What was the motivation for adding the IPV6_V6ONLY flag?

In IPv6 networking, the IPV6_V6ONLY flag is used to ensure that a socket will only use IPv6, and …

networking ipv6 setsockopt
How is it possible to have send timeout on a non blocking socket?

I have some problems understanding the working of sockets in Linux. setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(…

sockets network-programming setsockopt