本文介绍了C ++丢失了UDP数据包,实际上它们被延迟了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个连接echo服务器和测试客户端的UDP连接。测试客户端连续发送数据包并等待大约一秒钟接收它们。

如果无法获取数据包,则认为数据包丢失并发送另一个数据包。

大多数数据包都是成功发送和接收的,但其中一些假设丢失的数据包将在发送下一个数据包后在客户端接收。实际上它们会被延迟收到。

我可以做些什么来消除这些延迟的数据包?

(我的程序在我的localhost上运行 - 因此丢失数据包是不合理的)



我尝试了什么:



我在发送之间放了延迟步骤减少丢失的数量,但我不想等待。

I have a UDP connection that connects an echo server with a test client. test client continuously sends packets and waits about a second for receiving them.
if it can't get the packet, assumes that packet is lost and sends another packet.
Most of the packets are sent and received successfully but some of them that assumed to be lost, will be receive in client after sending next packet. actually they are received with delay.
what can I do for eliminating these delayed packets?
(my program is running on my localhost- so having lost packets is not reasonable)

What I have tried:

I put delay between my sending steps it reduced number of lost, But I don't want this waiting.

推荐答案



这篇关于C ++丢失了UDP数据包,实际上它们被延迟了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 15:48