首页 网络技术 其它     /    用C语言实现Socket模拟TCP协议

用C语言实现Socket模拟TCP协议

上传者: elivyxy | 上传时间:2022/9/5 6:20:13 | 文件大小:51.95MB | 文件类型:rar
用C语言实现Socket模拟TCP协议
使用VS中的VC++下面的CLR编写,主要目的用Socket模拟TCP通信协议,实验内容如下:i.实现滑动窗口协议,窗口大小为5ii.模拟采用三次握手机制,显示出ACK、ack、Seq等标识位和参数iii.必须采用应答机制、超时计数器技术、帧编号判重技术、重传技术iv.校验和技术a)校验和s的计算:设要发送n字节,bi为第i个字,s=(b0+b1+…+bn)mod256v.在接收端,设置随机数,根据随机数执行相关操作,0代表正常,1代表帧丢失,2代表帧出错,3代表应答帧丢失(即不发生应答帧)vi.必须使用图形界面,a)按批次(发送端一次发送的报文)显示相关内容b)发送端:显示发送的数据、能否重传、本次帧序号、接收到的应答帧的序号c)接收端:显示接收到的数据、本次帧序号、本次随机选择的出错情况、发送应答帧的序号、能否重复要先打开Server端启动监听,再打开Client端进行连接,三次握手之后开始通信。

文件下载

资源详情

[{"title":"(67个子文件51.95MB)用C语言实现Socket模拟TCP协议","children":[{"title":"TCP_Socket","children":[{"title":"Client","children":[{"title":"Client.sln <span style='color:#111;'>1.40KB</span>","children":null,"spread":false},{"title":".vs","children":[{"title":"Client","children":[{"title":"v15","children":[{"title":"ipch","children":[{"title":"AutoPCH","children":[{"title":"54b0956dc61d3843","children":[{"title":"MYFORM.ipch <span style='color:#111;'>10.56MB</span>","children":null,"spread":false}],"spread":true},{"title":"c358c61f70b1cb8e","children":[{"title":"CLIENTFORM.ipch <span style='color:#111;'>73.00MB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":".suo <span style='color:#111;'>33.50KB</span>","children":null,"spread":false},{"title":"Browse.VC.db <span style='color:#111;'>54.59MB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"Debug","children":[{"title":"Client.exe <span style='color:#111;'>104.00KB</span>","children":null,"spread":false},{"title":"Client.exe.metagen <span style='color:#111;'>1.06KB</span>","children":null,"spread":false},{"title":"Client.pdb <span style='color:#111;'>948.00KB</span>","children":null,"spread":false}],"spread":true},{"title":"Client","children":[{"title":"Client.vcxproj.filters <span style='color:#111;'>1.05KB</span>","children":null,"spread":false},{"title":"ClientForm.cpp <span style='color:#111;'>3.49KB</span>","children":null,"spread":false},{"title":"Client.vcxproj <span style='color:#111;'>6.77KB</span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"Client.tlog","children":[{"title":"metagen.write.1.tlog <span style='color:#111;'>2B</span>","children":null,"spread":false},{"title":"CL.write.1.tlog <span style='color:#111;'>996B</span>","children":null,"spread":false},{"title":"metagen.read.1.tlog <span style='color:#111;'>2B</span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'>1.18KB</span>","children":null,"spread":false},{"title":"Client.write.1u.tlog <span style='color:#111;'>20.35KB</span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'>42.67KB</span>","children":null,"spread":false},{"title":"CL.command.1.tlog <span style='color:#111;'>3.22KB</span>","children":null,"spread":false},{"title":"TZRES.DLL.bi <span style='color:#111;'>0B</span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'>496B</span>","children":null,"spread":false},{"title":"Client.lastbuildstate <span style='color:#111;'>205B</span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'>4.06KB</span>","children":null,"spread":false}],"spread":false},{"title":".NETFramework,Version=v4.6.1.AssemblyAttributes.obj <span style='color:#111;'>4.11KB</span>","children":null,"spread":false},{"title":"Client.ClientForm.resources <span style='color:#111;'>180B</span>","children":null,"spread":false},{"title":"vc141.pdb <span style='color:#111;'>444.00KB</span>","children":null,"spread":false},{"title":"ClientForm.obj <span style='color:#111;'>501.16KB</span>","children":null,"spread":false},{"title":"Client.vcxproj.GenerateResource.cache <span style='color:#111;'>944B</span>","children":null,"spread":false},{"title":"Client.vcxprojAssemblyReference.cache <span style='color:#111;'>6.22KB</span>","children":null,"spread":false},{"title":"Client.log <span style='color:#111;'>88B</span>","children":null,"spread":false},{"title":".NETFramework,Version=v4.6.1.AssemblyAttributes.asm <span style='color:#111;'>229B</span>","children":null,"spread":false}],"spread":true},{"title":"ClientForm.resx <span style='color:#111;'>5.68KB</span>","children":null,"spread":false},{"title":"Client.vcxproj.user <span style='color:#111;'>165B</span>","children":null,"spread":false},{"title":"ClientForm.h <span style='color:#111;'>13.50KB</span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Server","children":[{"title":"Server.sln <span style='color:#111;'>1.40KB</span>","children":null,"spread":false},{"title":".vs","children":[{"title":"Server","children":[{"title":"v15","children":[{"title":"ipch","children":[{"title":"AutoPCH","children":[{"title":"88086d07f977ba9e","children":[{"title":"CLIENTFORM.ipch <span style='color:#111;'>10.56MB</span>","children":null,"spread":false}],"spread":true},{"title":"4c08abc809b30fbf","children":[{"title":"SERV.ipch <span style='color:#111;'>73.00MB</span>","children":null,"spread":false}],"spread":true},{"title":"f661ed2810ada798","children":[{"title":"SERVER.ipch <span style='color:#111;'>10.56MB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":".suo <span style='color:#111;'>39.00KB</span>","children":null,"spread":false},{"title":"Browse.VC.db <span style='color:#111;'>54.61MB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"Debug","children":[{"title":"Server.exe.metagen <span style='color:#111;'>1.05KB</span>","children":null,"spread":false},{"title":"Server.pdb <span style='color:#111;'>940.00KB</span>","children":null,"spread":false},{"title":"Server.exe <span style='color:#111;'>106.00KB</span>","children":null,"spread":false}],"spread":true},{"title":"Server","children":[{"title":"Server.vcxproj <span style='color:#111;'>6.75KB</span>","children":null,"spread":false},{"title":"Server.vcxproj.user <span style='color:#111;'>165B</span>","children":null,"spread":false},{"title":"Server.vcxproj.filters <span style='color:#111;'>1.04KB</span>","children":null,"spread":false},{"title":"Serv.cpp <span style='color:#111;'>4.61KB</span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"Server.vcxproj.GenerateResource.cache <span style='color:#111;'>938B</span>","children":null,"spread":false},{"title":".NETFramework,Version=v4.6.1.AssemblyAttributes.obj <span style='color:#111;'>4.11KB</span>","children":null,"spread":false},{"title":"vc141.pdb <span style='color:#111;'>444.00KB</span>","children":null,"spread":false},{"title":"Serv.obj <span style='color:#111;'>504.35KB</span>","children":null,"spread":false},{"title":"Server.Serv.resources <span style='color:#111;'>180B</span>","children":null,"spread":false},{"title":"Server.vcxprojAssemblyReference.cache <span style='color:#111;'>6.22KB</span>","children":null,"spread":false},{"title":"Server.log <span style='color:#111;'>82B</span>","children":null,"spread":false},{"title":"Server.tlog","children":[{"title":"metagen.write.1.tlog <span style='color:#111;'>2B</span>","children":null,"spread":false},{"title":"CL.write.1.tlog <span style='color:#111;'>972B</span>","children":null,"spread":false},{"title":"Server.lastbuildstate <span style='color:#111;'>205B</span>","children":null,"spread":false},{"title":"metagen.read.1.tlog <span style='color:#111;'>2B</span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'>1.15KB</span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'>42.49KB</span>","children":null,"spread":false},{"title":"CL.command.1.tlog <span style='color:#111;'>3.19KB</span>","children":null,"spread":false},{"title":"TZRES.DLL.bi <span style='color:#111;'>0B</span>","children":null,"spread":false},{"title":"Server.write.1u.tlog <span style='color:#111;'>27.20KB</span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'>484B</span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'>3.79KB</span>","children":null,"spread":false}],"spread":false},{"title":".NETFramework,Version=v4.6.1.AssemblyAttributes.asm <span style='color:#111;'>229B</span>","children":null,"spread":false}],"spread":true},{"title":"Serv.resx <span style='color:#111;'>5.68KB</span>","children":null,"spread":false},{"title":"Serv.h <span style='color:#111;'>19.96KB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • qq_32274035:
    用VS什么版本写的?2019-04-24

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明