本文介绍了如何处理NetworkStream.BeginRead的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解到TCP可以确保数据包到达的顺序,但不能确保它们是完整的.
我还读到解决此问题的系统是先发送数据包大小,然后读取直到收到完整的程序包,但我不知道如何实现这样的系统.

I read that TCP ensures the order of arrival of packets, but does not ensure that they are complete.
I also read that a system to solve this problem would be to first send the packet size and then read up until receiving a full package, but I do not understand how to implement such a system.

推荐答案



这篇关于如何处理NetworkStream.BeginRead的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 01:14