How do I extract the SID and RID values used in the BOSH transport protocol for XMPP? Specifically, I'm using xmpphp.
2条回答 默认 最新
- dqqn32019 2010-09-13 18:33关注
I've done quite a bit of work on XMPPHP especially the BOSH part of it (which until recently didn't even work). http://github.com/Wordi/xmpphp
In my case, I'm using it to bootstrap a UI client and provide auto-login capability for XMPP BOSH.
class Library_BOSH extends XMPPHP_BOSH { public function getAutoLoginInfo() { return array( "jid" => $this->fulljid, "rid" => $this->rid, "sid" => current( $this->sid ) ); } //we want to block saving the BOSH session into our $_SESSION, //since we're just using it to bootstrap the UI client public function saveSession(){;} } $bosh = new Library_BOSH( $server_address, $server_port, $jid, $password, NULL, NULL, FALSE, XMPPHP_Log::LEVEL_VERBOSE ); $bosh->connect( "http://myboshdomain.com/http-bind/", 60 ); $bosh->processUntil('session_start', 5); $bosh_info = $bosh->getAutoLoginInfo();
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 #MATLAB仿真#车辆换道路径规划
- ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
- ¥15 数据可视化Python
- ¥15 要给毕业设计添加扫码登录的功能!!有偿
- ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
- ¥15 微信公众号自制会员卡没有收款渠道啊
- ¥15 stable diffusion
- ¥100 Jenkins自动化部署—悬赏100元
- ¥15 关于#python#的问题:求帮写python代码
- ¥20 MATLAB画图图形出现上下震荡的线条