惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - heart-in-sky

查询效率分析 svn权限 为IIS服务器添加扩展 oracle 查询历史语句 VS自带混乱器 AjaxPro组件实现前后台数据无刷新交互 - heart-in-sky - 博客园 使用 StateServer 持久保存 Session 会话状态 ! VSS管理 oracle管理 C#操作服务器文件 服务器操作 iis发布网站,域名指向 关于软件开发和模块接口设计之一些思考 oracle数据库同步 Oracle常用的数据库字段类型 vs快捷键 对象数组与DataTable互换 C#网络编程 系统库设计说明书(数据库字典)
WCF双工
heart-in-sky · 2009-12-14 · via 博客园 - heart-in-sky

1、必须使用支持双向通信的绑定如NetTcpBinding、NetNamedPipeBinding、WSDualHttpBinding

2、整个Contract在服务端定义(包括服务接口和回调接口);用 CallbackContract 为服务接口定义回调;服务接口在服务端实现,回调接口在客户端实现。

      例:

       [ServiceContract(CallbackContract = typeof(ISomeCallbackContract))]

3、服务端用 OperationContext.Current.GetCallbackChannel<T>()获取调用当前操作的客户端实例通道

       例:

ISomeCallbackContract callback = OperationContext.Current.GetCallbackChannel<ISomeCallbackContract>()

4、服务端获得客户端实例通道的对象以后就可以调用客户端方法

     例:

      callback.SomeCallbackMethod2();

5、客户端创建回调的对象并生成操作调用的上下文并由客户端代理对象传回服务端