-
socket
这是一个简单的socket编程例子,非常适合刚接触socket编程者。程序简单、可用、易于理解。是个很好的socket范例。(A simple socket programming examples. Suitable for beginners. Program is simple, available, easy to understand.
Is a good example of socket programming.)
- 2013-09-16 15:38:21下载
- 积分:1
-
计算校验和
校验和算法描述:为保证网络上传输的数据的可靠性,在许多协议中都设置了校验和项,例如:IPv4、ICMPv4、IGMPV4、ICMPv6、UDP...
计算校验和
校验和算法描述:为保证网络上传输的数据的可靠性,在许多协议中都设置了校验和项,例如:IPv4、ICMPv4、IGMPV4、ICMPv6、UDP和TCP 等等。计算这些校验和的算法称为网际校验和算法,简单来说就是:把被校验的数据16位进行累加,然后取反码,若数据字节长度为奇数,则数据尾部补一个字节的0以凑成偶数。
由于从输入文件读入的数据不能直接满足计算校验和的条件,所以首先对从文件读入缓冲区的数据进行预处理,即读入缓冲区时忽略空格。由于累加是按16位进行的,所以每次从缓冲区中读出4个字符,并将字符转换成对应的16进制数字,如此依次累加,直至数据全部读完。
还有一种情况,即如果数据长度为奇数个字节,则需要判断,并补0累加。程序中利用的是缓冲区长度计数器i和当前读取到计数器j判断数据长度是否为奇数。即如果数据长度为偶数,则读完数据时当前读取到计数器j的值应与缓冲区长度i相等,而如果数据长度为奇数,则读完数据时,当前读取到计数器j>缓冲区长度i,此时需将缓冲区中剩余的两个字符读出,并补0,转换成相应16进制数以后参与累加。
当累加结束后,将累加和的16位以上数据位移下再进行一次累加,并对最后累加和取反即得所求校验和。
-calculated checksum checksum algorithm Description : To ensure the network transmission of data reliability, in many of the agreements are set up and calibration, for example : IPv4, ICMPv4, IGMPV4, ICMPv6. UDP and TCP so on. Calculating checksum algorithm called the Internet checksum algorithm, the simple answer is : as has been the calibration data for 16 cumulative, and then take the anti-code, if the data byte length of the odd, data will make up the tai
- 2022-01-26 06:39:03下载
- 积分:1
-
EX11_SCI_RS232
利用DSP上所带的按键发送字符串以达到控制(use keys to send message)
- 2014-05-06 20:02:41下载
- 积分:1
-
GIS-PPT-for-developer
GIS开发的教学文档,初学者或者教学适用(Development of GIS teaching documents, beginners applicable)
- 2014-04-03 14:39:14下载
- 积分:1
-
DKQ-A16D
易语言编写的新中新二代证读卡器例程,可提取文字信息,但还不能提取图片(Easy language to new routines in the new second generation ID card reader, you can extract the text information, but can not extract pictures)
- 2020-07-10 13:28:54下载
- 积分:1
-
N76E003_necT_samplecode
说明: 红外调制发射,可以参考,38k载波调制,实现轻松(Infrared modulated emission)
- 2020-06-17 03:00:01下载
- 积分:1
-
PWM_music
lpc2138程序的pwm应用-音乐程序(lpc2138 Application)
- 2009-10-07 20:36:52下载
- 积分:1
-
rc2
采集声音信号并进行错位乘加求时延,进行处理来估计角度(Collecting acoustic signal and delay seeking dislocation multiply)
- 2013-05-22 10:20:50下载
- 积分:1
-
c# socket网络编程 必看的实例源码下载(封装的很好)
c# socket网络编程 必看的实例源码下载(封装的很好)
- 2014-06-19下载
- 积分:1
-
网页中判断国家的代码,在网页中嵌入这段代码可以辨别出国家。具体的文件中有说明...
网页中判断国家的代码,在网页中嵌入这段代码可以辨别出国家。具体的文件中有说明-page judgment of a code embedded in the Web page source code can identify a country. Specific documentation is explained
- 2023-03-20 19:30:03下载
- 积分:1