What is the predictable behavior of changing SOL_SOCKET, SO_RCVBUF on the fly on a UDP socket?
问题 What should be expected to happen if we resize the input buffer of a UDP server socket on the fly on a Linux system? setsockopt(sock, SOL_SOCKET, SO_RCVBUF, ...) I am particularly interested in these questions: If I shrink below what is currently in the buffer, would this simply drop the oldest/newest? datagrams properly, or could it flush everything that's there, or worse could it corrupt data such as truncating a datagram? Would shrinking the buffer even save memory or something prevents