AJAX IRC 客户端,怎么样?
我想用 Javascript 构建一个 IRC 客户端,也许使用 jQuery,但我在入门时遇到了一些困难。
我稍微了解了 http://qwebirc.org/ 以及他们是如何做事的,但是他们有 很多代码只对他们的项目执行特定的操作。
我在网上搜索了一个简短的示例,它让我可以开始,这样我就可以进一步构建。关于在哪里查看有什么建议,或者有人可以举个例子吗?
I want to build a IRC client in Javascript, maybe using jQuery, but I am struggling a little in getting started.
I have looked a little at http://qwebirc.org/ and how they are doing things, but they have A LOT of code doing specific things only to their project.
I have searched the net for a short example, that lets me start, so I could build further. Any suggestions on where to look, or someone who can come up with an example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
后端是比是否使用 jQuery 或类似的东西更重要的考虑因素。您可能知道,您无法真正用 Javascript 编写完整的基于浏览器的 IRC 客户端; JS 仅使用 XMLHTTPRequest 从用 PHP 等实现的 IRC 连接服务器端套接字收集数据。
为此,您可能会更幸运地寻找某种 PHP IRC 库(如下所示: http:// /sourceforge.net/projects/phpsmartirc/),然后单独设置客户端前端,这将在某种程度上减轻“大量代码只对他们的项目执行特定操作”。
The backend is a more important consideration than whether or not you use jQuery or anything like that. As you may be aware, you can't really write a full browser-based IRC client in Javascript; the JS merely uses XMLHTTPRequest to collect data from an IRC-connected server-side socket implemented in something like PHP.
To that effect, you might have a lot more luck looking for some kind of PHP IRC library (like this: http://sourceforge.net/projects/phpsmartirc/) and then setting up the client frontend separately which will alleviate, to some extent, the "LOT of code doing specific things only to their project".
这是一个开源项目,它在制作 AJAX IRC 客户端方面取得了一些进展:
https://github.com/naneau/node-irc-client
Here's an open source project that has made some progress to making a AJAX IRC client:
https://github.com/naneau/node-irc-client
Elliott,后端没有比界面前端更重要的考虑因素,但是您的建议对于专家程序员开始 Ajax IRC 客户端来说是一个好主意!
PHP Smart IRC是一个PEAR包,旨在通过PHP套接字实现IRC协议通信。
优点是命令的执行已经准备好了,不需要从头启动这个类。
Elliott, the backend no is more important consideration than interface frontend, but your sugestion is a good ideia for a expert programmer begin a Ajax IRC Client!
PHP Smart IRC is a package PEAR that aims to implement IRC Protocol communication via PHP sockets.
The advantage is that the implementation of commands is ready, there is no need to start this class from the begin.
任何尝试都只是使用 AJAX 作为托管 Web 服务器上运行的 IRC 客户端/服务器之间的中间步骤。
使用 jquery.ui.chatbox 作为界面通过 AJAX 发送和接收的消息将使您能够灵活地以多种方式实现它,例如:
Any attempt will merely be using AJAX as an intermediate step between an IRC client/server running on the hosting web server.
Using jquery.ui.chatbox as the interface with messages being sent and received via AJAX would give you the flexibility to implement it in any number of ways e.g.: