gpt4 book ai didi

asp.net - Comet/Reverse AJAX 的现代实现如何工作?任何稳定的 C# WCF 或 ASP.NET 实现?

转载 作者:行者123 更新时间:2023-12-04 14:51:30 24 4
gpt4 key购买 nike

实现 Comet、HTTP Push 或 Reverse AJAX 的正确(或最佳)方式是什么?

您会推荐哪些 .NET 实现?

最佳答案

我听说过,WebSyncPokeIn ,两者都是付费实现,我使用了 PokeIn 并且它非常简单。如果您期待编写自己的 COMET 实现代码,我只能说这是一项复杂的任务,因为您需要修改 IIS 的自然行为。它是一种绕过 HTTP 协议(protocol)限制的 hacky 方法,您需要非常清楚自己在做什么,所以不要最终破坏 =)。

It's also known as long-lived requests. This is also by far the most complex method to implement. Basically, a request is made by the client, and the server very slowly responds, which causes the connection to be maintained. Periodically, when the server has something to push, it'll "burst" send the information, so to speak. This approach gives you real-time push, which is great. But, it has a serious down-side: holding connections open like that isn't how the underlying protocols are meant to work, and most servers aren't terribly happy about it. If your traffic gets too great, you'll chew up threads on the server and wind up bringing your site down. ref: http://www.coderanch.com/t/121668/HTML-JavaScript/does-Reverse-Ajax-Works

关于asp.net - Comet/Reverse AJAX 的现代实现如何工作?任何稳定的 C# WCF 或 ASP.NET 实现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5427681/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com