Home  >  Q&A  >  body text

c++ - udp本机回环传输大量数据的时候丢包!

大量数据的话采用拆包成1472之内的包,然后偶尔会出现丢包情况,我把读写缓冲区都调的好大,可是好像并没有改善,还是会有丢包现象,请问可能会是什么原因?如何解决?

阿神阿神2715 days ago607

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:06:53

    The local loopback does not use the network card, and the direct memory operation speed is too fast, so it is normal for the data to exceed the kernel buffer. Control the flow. After all, UDP itself allows packet loss. Generally speaking, it depends on whether the specific network card communication is losing packets or not.

    reply
    0
  • Cancelreply