将数据从webservice发送到Windows应用程序 [英] sending data from webservice to windows app

查看:139
本文介绍了将数据从webservice发送到Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我计划创建一个Windows应用程序和Web服务和网站

我必须将一些数据[作为命令]发送到Windows应用程序。

所以首先我要知道win应用程序已启动并且runnig,第二我必须向其发送数据

i知道如何将数据从win app发送到webservice但我不知道如何从webservice发送到应用程序。我之前完成的所有工作都是将数据从win app发送到webservice并得到结果,但是这个,我不知道该说些什么。你能帮我吗?!

hi there
im planning to create a windows application and webservice and website
and i have to send some data [as command] to windows application.
so first i have to know that the win app is up and runnig , second i have to send data to it
i know how to send data from win app to webservice but i donno how to sendit from webservice to app. all works that i done before is sending data from win app to webservice and get the result, but this one , i donno what to say. can you please help me?!

推荐答案

你问的是一个重要的功能,遗憾的是用HTTP实现起来并不容易,主要是为纯客户端构建 - 服务器范例,当客户端请求发生一切时:客户端发送HTTP请求,并从服务器获取HTTP响应。



这叫做拉技术。这真是一个严峻的限制。即使像Web聊天这样的基本内容也受到这种限制的极大影响。客户端必须不断地在服务器上轮询char上的新事件,这是浪费而且不能同时响应不足。你真正需要的是所谓的服务器推送。请参阅:

http://en.wikipedia.org/wiki/Pull_technology [< a href =http://en.wikipedia.org/wiki/Pull_technologytarget =_ blanktitle =New Window> ^ ],

http://en.wikipedia.org/wiki/Push_technology [ ^ ],

http:/ /www.asp.net/signalr [ ^ ],

http://signalr.net/ [ ^ ]。



上面提到的SignalR是一个实现服务器推送的新ASP.NET库。 />


-SA
You are asking about an important feature which is unfortunately not so easy to implement with HTTP, which is primarily build for pure client-server paradigm, when everything happens on request from client side: a client sends HTTP request, and get HTTP response from server.

This is called pull technology. It is really a draconian limitation. Even such a basic thing as a Web chat suffers greatly from such limitation. A client has to constantly poll the servers for new events on the char, which is wasteful and not responsive enough from at the same time. What you really need is so called server push. Please see:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Push_technology[^],
http://www.asp.net/signalr[^],
http://signalr.net/[^].

SignalR referenced above is a new ASP.NET library implementing server push.

—SA


这篇关于将数据从webservice发送到Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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