Wcf利用Tcp实现双向通信,实时监控

上传者: u011630900 | 上传时间: 2019-12-21 21:23:16 | 文件大小: 430KB | 文件类型: zip
前段时间在做WCF开发的过程中,用户需要在服务端对客户端进行监控,需要知道客户端什么时候上线,什么时候下线,当然服务端也可以给客户端推送信息,就是所谓的双向通信了。 要双向通信用我以前的HTTP协议是行不通了,问了一下别人,别人说了一个“心跳更新”这个概念,想必大家都懂这个吧,大概意思呢就是A向B定时发送一个消息来监测B是否活着,如果活着就返回一个消息,死掉当然就不需要了,其实我觉得心跳更新就是TCP协议,也就是双向通信,互相监测活着或者死掉。

文件下载

资源详情

[{"title":"( 98 个子文件 430KB ) Wcf利用Tcp实现双向通信,实时监控","children":[{"title":"WinTestTcp","children":[{"title":"WinTestTcp.v12.suo <span style='color:#111;'> 39.50KB </span>","children":null,"spread":false},{"title":"WinTestTcp.sln <span style='color:#111;'> 872B </span>","children":null,"spread":false},{"title":"WinTestTcp","children":[{"title":"WinTestTcp.csproj <span style='color:#111;'> 4.87KB </span>","children":null,"spread":false},{"title":"ClientFrm.Designer.cs <span style='color:#111;'> 4.26KB </span>","children":null,"spread":false},{"title":"ClientFrm.resx <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 495B </span>","children":null,"spread":false},{"title":"app.config <span style='color:#111;'> 662B </span>","children":null,"spread":false},{"title":"Service References","children":[{"title":"MessageService","children":[{"title":"service.xsd <span style='color:#111;'> 788B </span>","children":null,"spread":false},{"title":"service1.xsd <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false},{"title":"Reference.cs <span style='color:#111;'> 3.43KB </span>","children":null,"spread":false},{"title":"Reference.svcmap <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"service.wsdl <span style='color:#111;'> 4.18KB </span>","children":null,"spread":false},{"title":"configuration91.svcinfo <span style='color:#111;'> 20.07KB </span>","children":null,"spread":false},{"title":"configuration.svcinfo <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Properties","children":[{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.80KB </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.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"obj","children":[{"title":"x86","children":[{"title":"Debug","children":[{"title":"WinTestTcp.csproj.GenerateResource.Cache <span style='color:#111;'> 981B </span>","children":null,"spread":false},{"title":"WinTestTcp.pdb <span style='color:#111;'> 27.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":[{"title":"Service References.ServiceReference1.Reference.cs.dll <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"Service References.MessageService.Reference.cs.dll <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false}],"spread":false},{"title":"WinTestTcp.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"WinTestTcp.ClientFrm.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 8.05KB </span>","children":null,"spread":false},{"title":"WinTestTcp.csproj.FileListAbsolute.txt <span style='color:#111;'> 2.38KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"WinTestTcp.csprojResolveAssemblyReference.cache <span style='color:#111;'> 10.21KB </span>","children":null,"spread":false},{"title":"WinTestTcp.exe <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"ClientFrm.cs <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"WinTestTcp.pdb <span style='color:#111;'> 27.50KB </span>","children":null,"spread":false},{"title":"WinTestTcp.vshost.exe.config <span style='color:#111;'> 662B </span>","children":null,"spread":false},{"title":"WinTestTcp.vshost.exe <span style='color:#111;'> 23.66KB </span>","children":null,"spread":false},{"title":"WinTestTcp.exe.config <span style='color:#111;'> 662B </span>","children":null,"spread":false},{"title":"WinTestTcp.exe <span style='color:#111;'> 11.50KB </span>","children":null,"spread":false}],"spread":false},{"title":"Release","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"WinTestTcp.suo <span style='color:#111;'> 10.00KB </span>","children":null,"spread":false},{"title":"WinTestTcp.v11.suo <span style='color:#111;'> 22.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"WcfServiceTcpDemo","children":[{"title":"WcfServiceLibraryDemo","children":[{"title":"WcfServiceLibraryDemo.csproj.user <span style='color:#111;'> 589B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false}],"spread":true},{"title":"IService1.cs <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false},{"title":"Service1.cs <span style='color:#111;'> 901B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"WcfServiceLibraryDemo.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.09KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"WcfServiceLibraryDemo.dll <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.64KB </span>","children":null,"spread":false},{"title":"WcfServiceLibraryDemo.csprojResolveAssemblyReference.cache <span style='color:#111;'> 7.49KB </span>","children":null,"spread":false},{"title":"TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"WcfServiceLibraryDemo.pdb <span style='color:#111;'> 17.50KB </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":"WcfServiceLibraryDemo.csproj <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"WcfServiceLibraryDemo.dll <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"WcfServiceLibraryDemo.pdb <span style='color:#111;'> 17.50KB </span>","children":null,"spread":false},{"title":"MySql.Data.dll <span style='color:#111;'> 288.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"Release","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"WinWcf","children":[{"title":"WebService.cs <span style='color:#111;'> 931B </span>","children":null,"spread":false},{"title":"TcpFrm.cs <span style='color:#111;'> 6.27KB </span>","children":null,"spread":false},{"title":"TcpFrm.resx <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"IMessageService.cs <span style='color:#111;'> 1023B </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 543B </span>","children":null,"spread":false},{"title":"MessageService.cs <span style='color:#111;'> 2.66KB </span>","children":null,"spread":false},{"title":"MainFrm.cs <span style='color:#111;'> 5.32KB </span>","children":null,"spread":false},{"title":"app.config <span style='color:#111;'> 144B </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"app.manifest <span style='color:#111;'> 2.37KB </span>","children":null,"spread":false}],"spread":true},{"title":"TcpFrm.Designer.cs <span style='color:#111;'> 4.49KB </span>","children":null,"spread":false},{"title":"MainFrm.Designer.cs <span style='color:#111;'> 2.80KB </span>","children":null,"spread":false},{"title":"MainFrm.resx <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"x86","children":[{"title":"Debug","children":[{"title":"WinWcf.csproj.FileListAbsolute.txt <span style='color:#111;'> 2.11KB </span>","children":null,"spread":false},{"title":"WinWcf.TcpFrm.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"WinWcf.MainFrm.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"WinWcf.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"WinWcf.csprojResolveAssemblyReference.cache <span style='color:#111;'> 7.24KB </span>","children":null,"spread":false},{"title":"TempPE","children":[{"title":"Properties.Resources.Designer.cs.dll <span style='color:#111;'> 4.50KB </span>","children":null,"spread":false}],"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.29KB </span>","children":null,"spread":false},{"title":"WinWcf.pdb <span style='color:#111;'> 51.50KB </span>","children":null,"spread":false},{"title":"WinWcf.exe <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":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 1.42KB </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},{"title":"WinWcf.csproj.GenerateResource.Cache <span style='color:#111;'> 1.01KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"WinWcf.csproj <span style='color:#111;'> 4.76KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"WinWcf.vshost.exe.manifest <span style='color:#111;'> 2.37KB </span>","children":null,"spread":false},{"title":"WcfServiceLibraryDemo.dll <span style='color:#111;'> 5.50KB </span>","children":null,"spread":false},{"title":"WinWcf.vshost.exe.config <span style='color:#111;'> 144B </span>","children":null,"spread":false},{"title":"WinWcf.pdb <span style='color:#111;'> 51.50KB </span>","children":null,"spread":false},{"title":"WinWcf.exe <span style='color:#111;'> 19.50KB </span>","children":null,"spread":false},{"title":"WinWcf.exe.config <span style='color:#111;'> 144B </span>","children":null,"spread":false},{"title":"WcfServiceLibraryDemo.pdb <span style='color:#111;'> 17.50KB </span>","children":null,"spread":false},{"title":"WinWcf.vshost.exe <span style='color:#111;'> 23.66KB </span>","children":null,"spread":false},{"title":"MySql.Data.dll <span style='color:#111;'> 288.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"Release","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"WcfServiceTcpDemo.sln <span style='color:#111;'> 2.52KB </span>","children":null,"spread":false},{"title":"WcfServiceTcpDemo.v12.suo <span style='color:#111;'> 68.00KB </span>","children":null,"spread":false},{"title":"WcfServiceTcpDemo.suo <span style='color:#111;'> 35.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • tjd :
    非常感谢分享!
    2020-11-29
  • 雅各伯·Jacob :
    很不错,通过自己的改造已经可以适用到任何程序版本
    2020-07-01
  • cicy0078 :
    确实不错的,谢谢
    2019-05-14
  • Bazzi_Com_Cn :
    WIN10打不开,提示“打开操作没有在分配的超时 00:01:00 内完成。
    2019-04-15
  • tajear :
    很不多的demo,多谢
    2019-03-01

免责申明

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