如何通过 BOSH 使用 XMPP [英] How to use XMPP over BOSH

查看:38
本文介绍了如何通过 BOSH 使用 XMPP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我对 BOSH 究竟是什么有点困惑.它是一种使用 http 与 XMPP 服务器交互的方式吗?例如,openfire 在 http://domain.com:7070/http-bind/ 使用 BOSH

So im a little confused about what excatly BOSH is. Is it a way to interact with the XMPP server using http? For example openfire uses BOSH at http://domain.com:7070/http-bind/

我如何使用这个网址?需要做什么?

How do i use this URL ? What needs to be done?

推荐答案

简单来说,BOSH 就是使用 HTTP 调用模拟客户端和 XMPP 服务器之间的持久连接.

In simple terms, BOSH is simulating a persistent connection between client and XMPP server using HTTP calls.

客户端向服务器发出 HTTP(s) 请求,如果服务器没有任何内容要发送给客户端,则服务器会在配置的时间(例如 30 秒)内保持连接.30秒后,服务器返回客户端发起的HTTP请求.客户端立即发出另一个 HTTP 请求,然后继续.

The client makes an HTTP(s) request to the server, if the server does not have anything to send to the client, the server holds on to the connection for a configured amount of time (say 30 seconds). After 30 seconds, the server returns the HTTP request initiated by the client. Instantly the client makes another HTTP request and this goes on.

使用这种方法,客户端模拟持久会话.

Using this approach, the client simulates a persistent session.

这篇关于如何通过 BOSH 使用 XMPP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆