How to use XMPP over BOSH

房东的猫 提交于 2020-01-01 04:17:07

问题


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?


回答1:


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

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.




回答2:


BOSH is defined by XEP-206.



来源:https://stackoverflow.com/questions/2393774/how-to-use-xmpp-over-bosh

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!