WebQQ消息发送功能
我这几天一直在研究WebQQ,刚开始以为是socket来实现消息的发送,但是后来感觉不像,我怀疑是用ajax实现的,因为我昨天晚上用firebug查看了一下WebQQ的发送按钮元素,发现它是一个空的超链接,而且没有绑定任何的事件,但是却可以实现发送消息的功能,真的是太神奇,如果是ajax实现的,那也应该有调用函数的过程啊!!有哪位高人知道其中的奥秘,给在下解惑,感激不尽。。。
回复讨论(解决方案)
comet?
JS赋值上去的事件你看不见。
comet 我在网上也百度了很多资料,都说是基于ajax的技术,但是却没有更加详细的实例,你能给我具体的解释一下吗?
JS赋值上去的事件你看不见。
那你知道怎么通过firebug查看那些js函数吗?
找按钮的节点名,class或者,id,然后CTRL+F,绑定事件必须定位!
不太可能是轮询,这样会拖垮服务器的。
据猜测可能是socket,只不过是隔某段时间重连一次。
我又百度了一下,据很多人说是comet技术,但是comet技术到底是个什么样的技术,它给出的代码和实例根本看不懂。。
firebug不是什么请求都能看得到的
websocket?估新没这么新颖吧
轮询
收到一条消息就断开 然后继续连接
百度了好多资料,我现在不清楚的问题是,如果是ajax实现的,那么如果是两个客户端进行通信,ajax不是只能把数据返回给其中的一个客户端吗?那另外一个客户端,服务器是怎么给他把数据发送过去的呢?
11楼正街 其他人没去看过不要乱说 楼主抓包能力有待提高 firebug足矣
webqq现在的研究资料多了,其实也很简单,去这个地址看看交流一下吧 www.10qf.com

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.
