我想在 EXT.NET 中开发聊天应用程序

发布于 2024-12-25 05:12:31 字数 326 浏览 2 评论 0原文

可能的重复:
开发聊天模块

我需要您的帮助来在 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

秉烛思 2025-01-01 05:12:31

我假设您说的是网络应用程序。在这种情况下,您需要使用 AJAX 轮询的方法,以给定的时间间隔(例如 1 秒)从两个客户端调用您的服务器。

或者,如果您不介意仅使用 HTML 5 浏览器(IE9 除外),您可以使用 Websockets 将消息推送到客户端。这是一个开源 .NET 框架,专门用于构建聊天应用程序:

http://superwebsocket.codeplex.com/

祝你好运!

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:

http://superwebsocket.codeplex.com/

Good luck!

酒浓于脸红 2025-01-01 05:12:31

您可以在网页中放置一种计时器,使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文