在ASP.NET聊天应用 [英] Chat Application in ASP.NET

查看:138
本文介绍了在ASP.NET聊天应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一个朋友在ASP.NET一个Ajax聊天的Web应用程序,我有一个问题:如果客户端1将消息发送到客户机程序,应该如何应用程序将消息发送给客户机2?难道还有比发送请求到服务器,问是否有新邮件更好的办法?是否有可能直接将消息发送到客户端?

I've to write an Ajax chat web application in ASP.NET for a friend, and I've a question: if client1 sends a message to client2, how should the application send the message to client2? Is there a better way than sending requests to the server, "asking" if there are new messages? Is it possible to directly send the message to the client?

推荐答案

你可以做的最好的事情就是使用的持久性HTTP连接。的方式谷歌没有与谷歌谈自己的 GMAIL 的网站。

Best thing you can do is use a Persistent HTTP Connection. The way google does with Google Talk on their GMAIL website.

这篇关于在ASP.NET聊天应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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