提高UDP可靠性 [英] Improving UDP reliability

查看:179
本文介绍了提高UDP可靠性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立一个小的基于UDP服务器。服务器是基于.Net和使用Socket类它的自我。我通过ReceiveMessageFromAsync使用完成端口,以及异步发送。

I am building a small UDP based server. the server is based on .Net and uses the Socket class it self. I'm using completion ports through ReceiveMessageFromAsync, and the async send.

我的问题是,我失去5%左右我的流量-10%。现在我明白了,这是正常的,但有什么办法改善这个统计的?

My problem is I'm loosing around 5%-10% of my traffic. Now i understand this is normal, but is there any way of improving this statistic?

推荐答案

您可能想看看这个问题的答案滚动你自己的可靠性层在UDP之上...的What你使用时,你需要可靠的UDP?

You might want to look at the answers to this question before rolling your own reliability layer on top of UDP... What do you use when you need reliable UDP?

另外,您可以尝试,并增加数据通过套接字的发送和recv缓冲区尽可能大通过设置适当的套接字选项,你开始的recv之前获得通过的数额。

Alternatively you can try and increase the amount of data that gets through by making the socket's send and recv buffers as large as possible by setting the appropriate socket options before you start to recv.

这篇关于提高UDP可靠性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆