服务器可以在没有请求的情况下在asp.net中进行响应 [英] can server respond without request in asp.net

查看:97
本文介绍了服务器可以在没有请求的情况下在asp.net中进行响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好
我想知道是服务器可以自动响应吗?当有登录用户的东西时.
我想在聊天工具中使用它,因为我必须在指定的时间请求获取新的味精.我希望服务器收到一些新消息时会自动回复.

在此先感谢

hello
i want to know that is a server can response automatically ?. when there is something for a user who is signed in.
i want to use this in my chat tool because i have to request at a specified time to get new msg. i want that when server has some new message it itself reply.

thanks in advance

推荐答案

这不是平常的东西.原则上,它可以,但是首先,浏览器会限制此类技术的应用.使用自定义聊天客户端(而不是Web浏览器)可能会更好.无论如何,基于Ajax的技术都呈现出隐藏的拉技术.真正的事情是HTTP服务器推送.

您需要查看的内容称为服务器推送".请参阅:
http://en.wikipedia.org/wiki/Server-push [
This is not a usual stuff. In principle, it can, but the application such technologies are very limited, first of all, by the browsers. You could be better off using a custom chat client (not a Web browser). The techniques based on Ajax present hidden pull techniques anyway. The real thing is HTTP server push.

What you need to look at is called "server push". Please see:
http://en.wikipedia.org/wiki/Server-push[^].

—SA


最好使用间隔为几毫秒的时间戳来查找服务器的任何已分配任务.
Better use timestamps with an interval of some milli seconds to look for any assigned tasks for server.


这篇关于服务器可以在没有请求的情况下在asp.net中进行响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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