在WCF客户端 - 服务器通信中,无需调用任何功能即可从服务器向客户端连续发送数据。 [英] In WCF Client-Server Communication with Continuously sending data from server to client without calling any function.

查看:82
本文介绍了在WCF客户端 - 服务器通信中,无需调用任何功能即可从服务器向客户端连续发送数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Friend's



当我实现基于WCF的客户端服务器通信时,我遇到了问题。



实际上我根据调用函数进行了通信。



在服务器端我实现了函数,当我们需要得到任何结果时,我调用的函数是客户端。



和我想要的是我想要的套接字编程,我可以在没有调用任何功能的情况下连续发送任何数据。



请帮帮我。提前谢谢。

Hi Friend's

I am getting a problem, when i am implementing WCF based client server communication.

Actually i did Communication based on calling function.

In server side i have implemented function and when we need to get any result than i am calling that function to client.

and what i want is that i want like socket programming in that i can send continuously any data when any data came without invoking any function.

Please help me out. Thank's in advance.

推荐答案

您可以使用事件。但首先,客户端必须订阅服务器的事件。

如果要将数据从服务器发送到客户端,请使用适当的参数引发事件。
You could use events. But at first, the client has to subscribe the events of the server.
When you want to send data from the server to the client, raise the event with appropriate arguments.


这篇关于在WCF客户端 - 服务器通信中,无需调用任何功能即可从服务器向客户端连续发送数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆