欢迎来到天天文库
浏览记录
ID:40587006
大小:220.22 KB
页数:16页
时间:2019-08-04
《xmpp-多人聊天实例》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、一直想写东西,但是上班不能在CSDN上写东西。下班回家又忙着学Iphone开发,唉,两个个字,忒忙。今天就写写Smack的聊天室功能吧。先上代码:viewplain1.import java.io.BufferedReader; 2.import java.io.InputStreamReader; 3.import java.util.ArrayList; 4.import java.util.Collection; 5.import java.util.Iterator; 6.import java.util.List; 7. 8.import
2、org.jivesoftware.smack.Chat; 9.import org.jivesoftware.smack.ConnectionConfiguration; 10.import org.jivesoftware.smack.MessageListener; 11.import org.jivesoftware.smack.PacketListener; 12.import org.jivesoftware.smack.SmackConfiguration; 13.import org.jivesoftware.smack.XMPPConnec
3、tion; 14.import org.jivesoftware.smack.XMPPException; 15.import org.jivesoftware.smack.packet.Message; 16.import org.jivesoftware.smack.packet.Packet; 17.import org.jivesoftware.smack.provider.ProviderManager; 18.import org.jivesoftware.smackx.Form; 19.import org.jivesoftware.sm
4、ackx.FormField; 20.import org.jivesoftware.smackx.ServiceDiscoveryManager; 21.import org.jivesoftware.smackx.muc.DefaultParticipantStatusListener; 22.import org.jivesoftware.smackx.muc.DefaultUserStatusListener; 23.import org.jivesoftware.smackx.muc.DiscussionHistory; 24.import or
5、g.jivesoftware.smackx.muc.HostedRoom; 25.import org.jivesoftware.smackx.muc.InvitationListener; 26.import org.jivesoftware.smackx.muc.InvitationRejectionListener; 27.import org.jivesoftware.smackx.muc.MultiUserChat; 28.import org.jivesoftware.smackx.muc.RoomInfo; 29.import org.jiv
6、esoftware.smackx.muc.SubjectUpdatedListener; 30.import org.jivesoftware.smackx.packet.ChatStateExtension; 31.import org.jivesoftware.smackx.packet.DiscoverInfo; 32.import org.jivesoftware.smackx.packet.DiscoverItems; 33.import org.jivesoftware.smackx.packet.OfflineMessageInfo; 34.
7、import org.jivesoftware.smackx.packet.OfflineMessageRequest; 35.import org.jivesoftware.smackx.provider.AdHocCommandDataProvider; 36.import org.jivesoftware.smackx.provider.BytestreamsProvider; 37.import org.jivesoftware.smackx.provider.DataFormPro
此文档下载收益归作者所有