Socket编程TCP粘包Demo.zip

上传者: 15029743 | 上传时间: 2021-04-28 10:17:41 | 文件大小: 10.41MB | 文件类型: ZIP
利用网络通信中,经常会出现粘包的问题,围绕着这个问题说原因和解决的蛮多帖子的,但是给出粘包代码的就好少,为了便于大家更好的理解粘包的问题,这里对客户端和服务器端出现的粘包问题进行模拟

文件下载

资源详情

[{"title":"( 94 个子文件 10.41MB ) Socket编程TCP粘包Demo.zip","children":[{"title":"Socket编程TCP粘包Demo","children":[{"title":"ServerDemo","children":[{"title":"ServerDemo.sln <span style='color:#111;'> 999B </span>","children":null,"spread":false},{"title":"ServerDemo","children":[{"title":"ServerDemo.csproj <span style='color:#111;'> 2.95KB </span>","children":null,"spread":false},{"title":"packages.config <span style='color:#111;'> 143B </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 366B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":true},{"title":"App.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"ServerDemo.csprojResolveAssemblyReference.cache <span style='color:#111;'> 12.17KB </span>","children":null,"spread":false},{"title":"ServerDemo.csproj.FileListAbsolute.txt <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.04KB </span>","children":null,"spread":false},{"title":"ServerDemo.exe <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"ServerDemo.pdb <span style='color:#111;'> 19.50KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"ServerDemo.vshost.exe <span style='color:#111;'> 23.66KB </span>","children":null,"spread":false},{"title":"ServerDemo.vshost.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 691.13KB </span>","children":null,"spread":false},{"title":"ServerDemo.exe <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"ServerDemo.pdb <span style='color:#111;'> 19.50KB </span>","children":null,"spread":false},{"title":"ServerDemo.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 683.92KB </span>","children":null,"spread":false},{"title":"ServerDemo.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"LitJson.dll <span style='color:#111;'> 51.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Server","children":[{"title":"demo.cs <span style='color:#111;'> 2.99KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"packages","children":[{"title":"repositories.config <span style='color:#111;'> 129B </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.12.0.3","children":[{"title":"packageIcon.png <span style='color:#111;'> 8.75KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"net45","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 691.13KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 683.92KB </span>","children":null,"spread":false}],"spread":true},{"title":"portable-net40+sl5+win8+wp8+wpa81","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 507.24KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 457.92KB </span>","children":null,"spread":false}],"spread":true},{"title":"portable-net45+win8+wp8+wpa81","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 670.28KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 652.91KB </span>","children":null,"spread":false}],"spread":true},{"title":"netstandard1.3","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 678.29KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 671.91KB </span>","children":null,"spread":false}],"spread":true},{"title":"net40","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 548.27KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 560.91KB </span>","children":null,"spread":false}],"spread":true},{"title":"netstandard1.0","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 670.28KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 653.42KB </span>","children":null,"spread":false}],"spread":false},{"title":"net20","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 590.25KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 557.41KB </span>","children":null,"spread":false}],"spread":false},{"title":"netstandard2.0","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 689.88KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 677.42KB </span>","children":null,"spread":false}],"spread":false},{"title":"net35","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 536.63KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 493.92KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"LICENSE.md <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.12.0.3.nupkg <span style='color:#111;'> 2.48MB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"ServerDemo.v12.suo <span style='color:#111;'> 37.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"clientdemo","children":[{"title":"clientdemo","children":[{"title":"packages.config <span style='color:#111;'> 143B </span>","children":null,"spread":false},{"title":"client","children":[{"title":"client.cs <span style='color:#111;'> 1.95KB </span>","children":null,"spread":false}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 348B </span>","children":null,"spread":false},{"title":"clientdemo.csproj <span style='color:#111;'> 2.95KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":true},{"title":"App.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"clientdemo.csprojResolveAssemblyReference.cache <span style='color:#111;'> 12.89KB </span>","children":null,"spread":false},{"title":"clientdemo.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.96KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"clientdemo.pdb <span style='color:#111;'> 19.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.04KB </span>","children":null,"spread":false},{"title":"clientdemo.exe <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"clientdemo.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 691.13KB </span>","children":null,"spread":false},{"title":"clientdemo.pdb <span style='color:#111;'> 19.50KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 683.92KB </span>","children":null,"spread":false},{"title":"clientdemo.exe <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"clientdemo.vshost.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false},{"title":"LitJson.dll <span style='color:#111;'> 51.50KB </span>","children":null,"spread":false},{"title":"clientdemo.vshost.exe <span style='color:#111;'> 23.66KB </span>","children":null,"spread":false},{"title":"clientdemo.exe.config <span style='color:#111;'> 187B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"clientdemo.v12.suo <span style='color:#111;'> 38.50KB </span>","children":null,"spread":false},{"title":"packages","children":[{"title":"repositories.config <span style='color:#111;'> 129B </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.12.0.3","children":[{"title":"packageIcon.png <span style='color:#111;'> 8.75KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"net45","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 691.13KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 683.92KB </span>","children":null,"spread":false}],"spread":true},{"title":"portable-net40+sl5+win8+wp8+wpa81","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 507.24KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 457.92KB </span>","children":null,"spread":false}],"spread":true},{"title":"portable-net45+win8+wp8+wpa81","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 670.28KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 652.91KB </span>","children":null,"spread":false}],"spread":true},{"title":"netstandard1.3","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 678.29KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 671.91KB </span>","children":null,"spread":false}],"spread":true},{"title":"net40","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 548.27KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 560.91KB </span>","children":null,"spread":false}],"spread":false},{"title":"netstandard1.0","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 670.28KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 653.42KB </span>","children":null,"spread":false}],"spread":false},{"title":"net20","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 590.25KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 557.41KB </span>","children":null,"spread":false}],"spread":false},{"title":"netstandard2.0","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 689.88KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 677.42KB </span>","children":null,"spread":false}],"spread":false},{"title":"net35","children":[{"title":"Newtonsoft.Json.xml <span style='color:#111;'> 536.63KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 493.92KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"LICENSE.md <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"Newtonsoft.Json.12.0.3.nupkg <span style='color:#111;'> 2.48MB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"clientdemo.sln <span style='color:#111;'> 999B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

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