To minimize the delay (I don't care about packet loss), I want to get the smallest possible receive buffer for UDP. However, when I set SO_RCVBUF below 1000 (using setsockopt), my program never receives any packages. The datagrams I send have 28 bytes of data, for a total packet size in the explorer of 70 bytes, so why can't I get anything if SO_RCVBUF is <1000? And how to change this to reduce the size of the buffer?
Also, is it possible to set a buffer in terms of the number of packets, not bytes? Or can you somehow manually delete it?
source
share