我想在 EXT.NET 中开发聊天应用程序
可能的重复:
开发聊天模块
我需要您的帮助来在 .net Framework 3.5 中开发聊天应用程序。
我可以存档以在聊天窗口中查看在线用户。现在我想立即向另一个在线用户发送消息,只要我向我的朋友发送消息,聊天消息就应该立即显示。
我可以将聊天消息插入到我的数据库中,但不知道如何立即将消息发送到我的朋友聊天窗口。
Possible Duplicate:
Developing chat Module
I need your help for developing chat application in .net framework 3.5.
I am able to archive to view online users in my chat window. now I want to sent message to another online user instantly as soon as I send message to My friend the chat message should be displayed instantly.
I am able to insert chat message to my database but Don't know how to sent message instantly to my friends chat window.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您说的是网络应用程序。在这种情况下,您需要使用 AJAX 轮询的方法,以给定的时间间隔(例如 1 秒)从两个客户端调用您的服务器。
或者,如果您不介意仅使用 HTML 5 浏览器(IE9 除外),您可以使用 Websockets 将消息推送到客户端。这是一个开源 .NET 框架,专门用于构建聊天应用程序:
祝你好运!
I assume you are speaking of a web application. In this case, you need to use a method of AJAX polling to call your server from both clients at a given time interval (1 second, for example).
Alternatively, if you don't mind using only HTML 5 browsers (except for IE9) you can use Websockets to push messages to the client. Here is an open source .NET framework just for that with a chat application built out:
Good luck!
您可以在网页中放置一种计时器,使用 ajax 从服务器提取最后一条消息,每次... 1 秒?半秒?类似的事情。
您可以在这里找到一些相关信息 http://www.w3schools.com/js/js_timing.asp 和 ext.net http://examples.ext.net/#/TaskManager/Basic/Overview/
希望有帮助。
You can put a kind of timer in your webpage pulling the last messages from the server, using ajax, each... 1 second? half a second? something like that.
You can find some information about this here http://www.w3schools.com/js/js_timing.asp and for ext.net http://examples.ext.net/#/TaskManager/Basic/Overview/
Hope it helps.