实现asp.net mvc聊天全双工
我想为我的社交网络创建一个类似于“聊天”的 Facebook/Gmail。
我正在寻找实现这一目标的最佳技术。 我找到了几个库,但我不知道哪个最合适
先决条件是:
- 框架c#
- 低带宽消耗
- 聊天集成到网站中,如果用户更改页面,连接应该保持活动
- 免费库(不付费)
- 共享托管,可以 如果可能的话,不要在网络服务器上安装任何东西
- 情况下自动回退到 flash 或类似的功能
- 利用支持它的浏览器的 webSocket 并在不支持一对一聊天的
- 如果可能的话我会避免 Silverlight(带有全双工 wcf)并使用 HTML / jquery 聊天
- 兼容对于所有浏览器
,我找到了以下库,但许多库不提供 ac# 实现或需要安装 COMET Web 服务器或需要在 Web 服务器上安装组件
- http://pokein.com/
- http://www.pokein.com/ ape-project.org/ajax-push.html
- http://code.google.com /p/jwebsocket/
- http://www.igniterealtime.org/projects/openfire/< /a>
- http://socket.io/
我相信使用反向 Ajax 等技术会消耗大量带宽, 正确的? 您将使用的最好的、免费的、有文档记录的、C# 实现的、带宽消耗低的库是什么?
谢谢
I want to create a Facebook/Gmail like chat me for my social network.
I'm looking for the best technique to achieve it.
I found several libraries, but I do not know what the most appropriate
The prerequisites are:
- framework c#
- low bandwidth consumption
- chat integrated into the site, if the user changes page, the connection should stay alive
- Free library (not paid)
- shared hosting, can not install nothing on web server
- if possible take advantage webSocket for browsers that support it and fall back to flash or similar automatically if not supported
- one to one chat
- If possible I would avoid Silverlight (with full duplex wcf) and use HTML / jquery chat
- compatible with all browsers
I found the following libraries, but many do not provide a c# implementation or need to install a COMET web server or need to install components on web server
- http://pokein.com/
- http://www.ape-project.org/ajax-push.html
- http://code.google.com/p/jwebsocket/
- http://www.igniterealtime.org/projects/openfire/
- http://socket.io/
I believe that use a technique such as Reverse Ajax consume a lot of bandwidth, right?
What is the best,free,documented and c# implemented libray with low consume of bandwith that you would use?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我个人而言,除非您有需要诸如 comet 之类的措施,否则我会使用基本的 JSON 轮询和节流之类的东西(这样您就可以减慢安静房间的轮询速度)。还有一个非常基本的“没有任何改变”的信息。例如,请单击上面的“聊天”链接。它简单实用...
重新保留在页面之间;更棘手,特别是如果您不想要 Silverlight。我们在那里使用了一些 HTML 5 技巧来避免破坏连接。
Personally, until you have measures that you need things like comet, I would use basic JSON polling with things like throttling (so you slow down the polling on quiet rooms). And a very basic "nothing had changed" message. For an example, click the "chat" link above. It is simple and pragmatic...
Re keeping between pages; trickier especially if you don't want Silverlight. We use a few HTML 5 tricks there to avoid hammering the connections.