C#Socket同步和异步传输

上传者: kaishifenfa | 上传时间: 2022-10-19 21:41:00 | 文件大小: 290KB | 文件类型: RAR
最近在研究Socket和异步 本例字中包含了 Socket异步传输小例子源码 实现了多个客户端连接一个客户端 并且对于字符串进行了一定处理 避免了服务端收到的信息混乱的现象 里面用了beginread() 异步回调

文件下载

资源详情

[{"title":"( 94 个子文件 290KB ) C#Socket同步和异步传输","children":[{"title":"Socket同步与异步","children":[{"title":"Client","children":[{"title":"Client","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"Client.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"Client.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"Client.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"Client.exe <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"Client.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"Client.csproj.FileListAbsolute.txt <span style='color:#111;'> 250B </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"Client.exe <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Client.csproj <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Client.suo <span style='color:#111;'> 18.00KB </span>","children":null,"spread":false},{"title":"ClientYB","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"ClientYB.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"ClientYB.pdb <span style='color:#111;'> 17.50KB </span>","children":null,"spread":false},{"title":"ClientYB.exe <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"ClientYB.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"ClientYB.csproj <span style='color:#111;'> 2.47KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 541B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"ClientYB.csproj.FileListAbsolute.txt <span style='color:#111;'> 268B </span>","children":null,"spread":false},{"title":"ClientYB.pdb <span style='color:#111;'> 17.50KB </span>","children":null,"spread":false},{"title":"ClientYB.exe <span style='color:#111;'> 6.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"SercerClient.cs <span style='color:#111;'> 2.92KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Client.sln <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false}],"spread":true},{"title":"Server","children":[{"title":"Server.suo <span style='color:#111;'> 20.50KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"TS.Win.Sys.ISystemWin.dll <span style='color:#111;'> 16.00KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.pdb <span style='color:#111;'> 25.50KB </span>","children":null,"spread":false},{"title":"TS.Win.Controls.FormUI.dll <span style='color:#111;'> 636.00KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.exe <span style='color:#111;'> 9.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Form1.Designer.cs <span style='color:#111;'> 2.06KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"WindowsFormsApplication1.pdb <span style='color:#111;'> 25.50KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.csproj.FileListAbsolute.txt <span style='color:#111;'> 882B </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"WindowsFormsApplication1.exe <span style='color:#111;'> 9.00KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.csproj.GenerateResource.Cache <span style='color:#111;'> 847B </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.Form1.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Form1.cs <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.csproj <span style='color:#111;'> 4.25KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.83KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"ServerYB","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"ServerYB.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"ServerYB.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"ServerYB.pdb <span style='color:#111;'> 19.50KB </span>","children":null,"spread":false},{"title":"ServerYB.exe <span style='color:#111;'> 7.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 723B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"ServerYB.csproj.FileListAbsolute.txt <span style='color:#111;'> 268B </span>","children":null,"spread":false},{"title":"ServerYB.pdb <span style='color:#111;'> 19.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"ServerYB.exe <span style='color:#111;'> 7.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"ServerYB.csproj <span style='color:#111;'> 2.52KB </span>","children":null,"spread":false},{"title":"RemoteClient.cs <span style='color:#111;'> 2.66KB </span>","children":null,"spread":false},{"title":"RequestHandler.cs <span style='color:#111;'> 2.77KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Server","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"Server.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"Server.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Form1.Designer.cs <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"Server.csproj.GenerateResource.Cache <span style='color:#111;'> 847B </span>","children":null,"spread":false},{"title":"ResolveAssemblyReference.cache <span style='color:#111;'> 18.30KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"Server.Server.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"Refactor","children":null,"spread":false},{"title":"Server.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"Server.csproj.FileListAbsolute.txt <span style='color:#111;'> 270B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Form1.cs <span style='color:#111;'> 356B </span>","children":null,"spread":false},{"title":"Server.csproj <span style='color:#111;'> 4.21KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Server1","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"Server1.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"Server1.exe <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false},{"title":"Server1.pdb <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false},{"title":"Server1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 754B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"Server1.csproj.FileListAbsolute.txt <span style='color:#111;'> 259B </span>","children":null,"spread":false},{"title":"Server1.exe <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false},{"title":"Server1.pdb <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Server1.csproj <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Client1","children":[{"title":"bin","children":[{"title":"Debug","children":[{"title":"Client1.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"Client1.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"Client1.exe <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"Client1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"Srver.csproj.FileListAbsolute.txt <span style='color:#111;'> 259B </span>","children":null,"spread":false},{"title":"Client1.pdb <span style='color:#111;'> 13.50KB </span>","children":null,"spread":false},{"title":"Client1.exe <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Srver.csproj <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Server.sln <span style='color:#111;'> 1.35KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

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