How does a Linux socket buffer overflow?

后端 未结 2 1921
-上瘾入骨i
-上瘾入骨i 2020-12-10 03:48

I have a Java reader application that reads from a multicast socket on a Linux 64-bit platform (2.6.18). The socket size has been set to 2 MB. When the reader cannot read

相关标签:
2条回答
  • 2020-12-10 04:31

    When the buffer is full, incoming packets are discarded. Packets that are already in the buffer are not modified or replaced.

    0 讨论(0)
  • 2020-12-10 04:37

    Just an addition to the answer by JS Bangs.

    This is not the only place in the network stack where packets can be dropped. Socket receive buffer is high in the hierarchy and is specific to the user socket. One other place closer to hardware (at least in Linux) is the queue between the device driver and the NET_RX softirq (see netif_rx().) These drops will contribute to RX-DRP column in netstat -i output.

    0 讨论(0)
提交回复
热议问题