1. create room
(1) attain unique name for room that will be created
<iq
id='unique1'
to='muc.test-d'
type='get'>
<unique xmlns='http://jabber.org/protocol/muc#unique'/>
</iq>
(2) use the unique name from step 1 to get the form of room and set some values in the form and send the form by iq
<iq id='create1'
to='testroom@muc.test-d'
type='get'>
<query xmlns='http://jabber.org/protocol/muc#owner'/>
</iq>
<iq type="set" id="create1" to="test006@muc.mml">
<query xmlns="http://jabber.org/protocol/muc#owner">
<x xmlns="jabber:x:data" type="submit">
<field var="muc#roomconfig_persistentroom">
<value>1</value>
</field>
<field var='muc#roomconfig_roomname'>
<value>test006</value>
</field>
<field var="muc#roomconfig_membersonly">
<value>1</value>
</field>
<field var="muc#roomconfig_changesubject">
<value>1</value>
</field>
</x>
</query>
</iq>
(3) add members into room that is created just now
<iq id='member1'
to='testroom1@muc.test-d'
type='set'>
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item affiliation='admin'
jid='132@test-d' nick='kevin'/>
</query>
</iq>
tigase muc 协议
未经允许不得转载:搜云库技术团队 » tigase muc 协议
相关推荐
- Java顺序查找、二分查找
- Java冒泡排序、选择排序、插入排序、希尔排序、归并排序、快速排序
- jvm:字节码(字节码角度分析a++与--a)
- 数据库连接池:Durid(执行流程、工具类)
- java:面向接口编程(解耦)
- jvm:字节码执行流程
- jvm:类文件结构(魔数、版本、常量池)
- HashMap:源代码(构造方法、put、resize、get、remove、replace)
- 多线程:生产者消费者(管程法、信号灯法)
- 多线程:锁(死锁、Lock锁、线程池)
- 多线程:(synchronized方法、synchronized块、JUC)
- 多线程:线程不安全案例(买票、银行取钱、集合)
- 多线程:(优先级、守护线程)
- 多线程(线程的状态、终止、休眠、礼让、合并)
- 多线程:多线程的应用(网图下载、模拟售票、龟兔赛跑)
- jvm调优(新生代、老年代调优)