gpt4 book ai didi

php - Facebook 聊天如何运作?

转载 作者:可可西里 更新时间:2023-10-31 22:46:32 25 4
gpt4 key购买 nike

Facebook 聊天如何运作?谁能给我主意?我的意思是他们使用的是 websocket 还是 AJAX?他们是如何实现的?

最佳答案

这是一个comet (see wikipedia)型号:

Comet is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it. Comet is an umbrella term, encompassing multiple techniques for achieving this interaction. All these methods rely on features included by default in browsers, such as JavaScript, rather than on non-default plugins. The Comet approach differs from the original model of the web, in which a browser requests a complete web page at a time.

cometd 框架的例子是APE .它适用于 javascript,但 cometd 不仅可以用 javascript 编写。

关于php - Facebook 聊天如何运作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7496381/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com