What happens if one doesn't call POSIX's `recv` “fast enough”?

前端 未结 2 800
猫巷女王i
猫巷女王i 2020-12-16 05:23

I want to account for a possible scenario where clients of my TCP/IP stream socket service send data to my service faster than it manages to move the data to its buffers (I

2条回答
  •  Happy的楠姐
    2020-12-16 06:12

    It's network driver stack that maintains data buffers (including the ones for incoming data). If the buffer is filled, consequent TCP packets are dropped, and the client is stuck trying to send the data. There's a bit more on this here and here.

提交回复
热议问题