在Tcp/Ip上自动完成CRC检查? [英] CRC checking done automatically on Tcp/Ip?

查看:479
本文介绍了在Tcp/Ip上自动完成CRC检查?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我有问题要问.

我想知道,在使用TcpClient发送数据时,是否存在任何类型的CRC
自动运行的检查算法?还是我必须实现自己的算法并在数据无法正确到达远程主机的情况下重新发送数据?

有什么想法吗?

我最好的问候...

Hey everyone.

I have question to ask.

I wonder, while sending data with TcpClient, is there any sort of CRC
checking algorithm that works automatically? Or I have to implement my own algorithm and resend the data if it doesn''t arrive to remote host correctly?

Any ideas?

My best regards...

推荐答案

此处 [ ^ ] TCP数据包包括一个校验和.满足您的要求是另一回事.
As described here[^] the TCP packet includes a checksum. Whether that is sufficient for your requirements is another matter.


TCP保证如果完全接收到数据,则将按顺序接收数据,如果丢失了数据包,则将自动进行错误检查并重新提交或腐败问题.对于普通应用程序,您无需执行任何其他操作.

它不做的一件事是使一个发送匹配一个接收(即,不保留数据包边界). TCP是一种流协议,您确实需要提供一些确定消息在何处开始和结束的方法.看看我的套接字库文章,了解有关两种实现方法的一些信息.
TCP guarantees that data will be received in order if it is received at all, and automatically error-checks and resubmits if there are packet loss or corruption issues. For normal applications you don''t need to do anything else.

The one thing it doesn''t do is make one send match one receive (that is, packet boundaries are not preserved). TCP is a stream protocol and you do need to provide some method of determining where messages start and end. Have a look at my sockets library article for some information about two ways to do that.


这篇关于在Tcp/Ip上自动完成CRC检查?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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