久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <legend id='XxIe1'><style id='XxIe1'><dir id='XxIe1'><q id='XxIe1'></q></dir></style></legend>
      <bdo id='XxIe1'></bdo><ul id='XxIe1'></ul>

    <small id='XxIe1'></small><noframes id='XxIe1'>

      <i id='XxIe1'><tr id='XxIe1'><dt id='XxIe1'><q id='XxIe1'><span id='XxIe1'><b id='XxIe1'><form id='XxIe1'><ins id='XxIe1'></ins><ul id='XxIe1'></ul><sub id='XxIe1'></sub></form><legend id='XxIe1'></legend><bdo id='XxIe1'><pre id='XxIe1'><center id='XxIe1'></center></pre></bdo></b><th id='XxIe1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XxIe1'><tfoot id='XxIe1'></tfoot><dl id='XxIe1'><fieldset id='XxIe1'></fieldset></dl></div>
    1. <tfoot id='XxIe1'></tfoot>

      1. 創建 xmpp muc 房間時遇到問題:代碼 503(服務不可用

        Trouble creating xmpp muc room: Code 503 (service unavailable)(創建 xmpp muc 房間時遇到問題:代碼 503(服務不可用))
      2. <small id='H7Qak'></small><noframes id='H7Qak'>

        1. <i id='H7Qak'><tr id='H7Qak'><dt id='H7Qak'><q id='H7Qak'><span id='H7Qak'><b id='H7Qak'><form id='H7Qak'><ins id='H7Qak'></ins><ul id='H7Qak'></ul><sub id='H7Qak'></sub></form><legend id='H7Qak'></legend><bdo id='H7Qak'><pre id='H7Qak'><center id='H7Qak'></center></pre></bdo></b><th id='H7Qak'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='H7Qak'><tfoot id='H7Qak'></tfoot><dl id='H7Qak'><fieldset id='H7Qak'></fieldset></dl></div>

              <tfoot id='H7Qak'></tfoot>
                <bdo id='H7Qak'></bdo><ul id='H7Qak'></ul>

                • <legend id='H7Qak'><style id='H7Qak'><dir id='H7Qak'><q id='H7Qak'></q></dir></style></legend>
                    <tbody id='H7Qak'></tbody>
                • 本文介紹了創建 xmpp muc 房間時遇到問題:代碼 503(服務不可用)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我創建房間的代碼:

                  XMPPRoomCoreDataStorage *rosterstorage = [[XMPPRoomCoreDataStorage alloc] init];
                  XMPPRoom *xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:rosterstorage jid:[XMPPJID jidWithString:@"groupchat@xmpp.getkismet.com/groupchat"] dispatchQueue:dispatch_get_main_queue()];
                  
                  [xmppRoom activate:[[self appDelegate] xmppStream]];
                  if ([xmppRoom preJoinWithNickname:@"nameToCreateRoom"]) 
                  {
                      NSLog(@"room created");
                      [xmppRoom joinRoomUsingNickname:self.userName history:nil];
                  }
                  [xmppRoom fetchConfigurationForm];
                  [xmppRoom configureRoomUsingOptions:nil];
                  [xmppRoom addDelegate:[self appDelegate] delegateQueue:dispatch_get_main_queue()];
                  

                  調試:

                  2012-08-03 07:46:29.204 iPhoneXMPP[9887:fb03] room created
                  2012-08-03 07:46:29:230 iPhoneXMPP[9887:15003] SEND: <iq type="get" to="groupchat@xmpp.getkismet.com" id="B793062B-0E09-492F-BC0F-703503AAA664"><query xmlns="http://jabber.org/protocol/muc#owner"/></iq>
                  2012-08-03 07:46:29:237 iPhoneXMPP[9887:15003] SEND: <iq type="set" to="groupchat@xmpp.getkismet.com" id="392D5BFC-707B-4F68-A829-56F949F4E96D"><query xmlns="http://jabber.org/protocol/muc#owner"><x xmlns="jabber:x:data" type="submit"/></query></iq>
                  2012-08-03 07:46:29:326 iPhoneXMPP[9887:14f03] SEND: <presence to="groupchat@xmpp.getkismet.com"><x xmlns="http://jabber.org/protocol/muc"/><x xmlns="vcard-temp:x:update"><photo>91217a961321f8f6380ea2feefd0632353ad296c</photo></x><c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="/></presence>
                  2012-08-03 07:46:29:327 iPhoneXMPP[9887:14f03] RECV: <iq xmlns="jabber:client" from="groupchat@xmpp.getkismet.com" to="lee@xmpp.getkismet.com/41068195801343976386548353" type="error" id="B793062B-0E09-492F-BC0F-703503AAA664"><query xmlns="http://jabber.org/protocol/muc#owner"/><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
                  2012-08-03 07:46:29:343 iPhoneXMPP[9887:fb03] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
                  2012-08-03 07:46:29:421 iPhoneXMPP[9887:15003] RECV: <iq xmlns="jabber:client" from="groupchat@xmpp.getkismet.com" to="lee@xmpp.getkismet.com/41068195801343976386548353" type="error" id="392D5BFC-707B-4F68-A829-56F949F4E96D"><query xmlns="http://jabber.org/protocol/muc#owner"><x xmlns="jabber:x:data" type="submit"/></query><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
                  2012-08-03 07:46:29:440 iPhoneXMPP[9887:fb03] iPhoneXMPPAppDelegate: xmppStream:didReceiveIQ:
                  

                  我看到它正在創建/加入 groupchat@xmpp.getkismet.com 而不是我指定的 groupchat@xmpp.getkismet.com/groupchat.我讀到這很可能是問題所在.但是,我已經指定了完整的 jid,所以我迷路了.

                  I see that it is creating/joining groupchat@xmpp.getkismet.com and not groupchat@xmpp.getkismet.com/groupchat like I specified. I read that this is most likely the problem. However, I have specified for the full jid, so I'm lost.

                  提前感謝所有提供幫助的人.

                  Thanks in advance to all who help.

                  推薦答案

                  首先看這里 XEP-0045:多用戶聊天.
                  如您所見,首先您必須發現您的用戶 (XMPPJID) 在 Jabber 服務器上具有哪些功能.

                  為此,將下一個命令發送到您的 Jabber 服務器:

                  First, take look here XEP-0045: Multi-User Chat.
                  As you can see, first you have to discover which capabilities your user (XMPPJID) has on the Jabber server.

                  To do this, send next command to your Jabber Server:

                  <iq from='user@jabber.server.com/resource' id='some_expression' to='jabber.server.com' type='get'>
                      <query xmlns='http://jabber.org/protocol/disco#items'/>
                  </iq>
                  

                  或使用 XMPP 庫函數在 Objective-C 中編寫:

                  or writen in objective-c using XMPP library functions:

                  NSError *error = nil;
                  NSXMLElement *query = [[NSXMLElement alloc] initWithXMLString:@"<query xmlns='http://jabber.org/protocol/disco#items'/>" 
                                                                          error:&error];
                  XMPPIQ *iq = [XMPPIQ iqWithType:@"get" 
                                               to:[XMPPJID jidWithString:@"jabber.server.com"] 
                                        elementID:[xmppStream generateUUID] child:query];
                  [xmppStream sendElement:iq];
                  

                  現在在 XMPPStream 委托中監聽來自服務器的響應 - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq 并且服務器響應應該是這樣的:

                  Now listen response from server in XMPPStream delegate - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq and server response should be something like this:

                  <iq from='jabber.server.com' id='some_expression' to='user@jabber.server.com/resource' type='result'>
                      <query xmlns='http://jabber.org/protocol/disco#items'>
                          <item jid='im.jabber.server.com' name='Instant Message Service'/>
                          <item jid='conference.jabber.server.com' name='Chatroom Service'/>
                      </query>
                  </iq>
                  

                  或目標c:

                  - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq
                  {
                  
                      if([iq isResultIQ])
                      {
                          if([iq elementForName:@"query" xmlns:@"http://jabber.org/protocol/disco#items"])
                          {
                              NSLog(@"Jabber Server's Capabilities: %@", [iq XMLString]);
                          }
                      }
                  }
                  

                  現在,對于返回的每個項目,將 IQ 發送到您的服務器以獲得它的屬性,并確定哪一個是 會議 類型,如下所示:

                  Now for every item returned send IQ to your server for it's properties and figure out which one is type of conference, something like this:

                  <iq from='user@jabber.server.com/resource' id='some_expression' to='conference.jabber.server.com' type='get'>
                      <query xmlns='http://jabber.org/protocol/disco#info'/>
                  </iq>
                  

                  或在目標c中:

                  - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq
                  {
                  
                      if([iq isResultIQ])
                      {
                          if([iq elementForName:@"query" xmlns:@"http://jabber.org/protocol/disco#items"])
                          {
                              NSXMLElement *query = [iq childElement];
                              NSArray *items = [query children];
                              for(NSXMLElement *item in items)
                              {
                                  NSError *error = nil;
                                  NSXMLElement *sendQuery = [[NSXMLElement alloc] initWithXMLString:@"<query xmlns='http://jabber.org/protocol/disco#info'/>" 
                                                                                              error:&error];
                                  XMPPIQ *sendIQ = [XMPPIQ iqWithType:@"get" 
                                                                   to:[XMPPJID jidWithString:[item attributeStringValueForName:@"jid"]] 
                                                            elementID:[xmppStream generateUUID] 
                                                                child:sendQuery];
                                  [xmppStream sendElement:sendIQ];
                              }
                          }
                      }
                  }
                  

                  監聽來自服務器的響應:

                  Listen for responses from server:

                  <iq from='conference.jabber.server.com' id='some_expression' to='user@jabber.server.com/resource' type='result'>
                      <query xmlns='http://jabber.org/protocol/disco#info'>
                          <identity category='conference' name='Server Group Chat Service' type='text'/>
                          <feature var='http://jabber.org/protocol/muc'/>
                      </query>
                  </iq>
                  

                  并從具有category:conference

                  - (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq
                  {
                  
                      if([iq isResultIQ])
                      {
                          if([iq elementForName:@"query" xmlns:@"http://jabber.org/protocol/disco#items"])
                          {
                              ...
                          }
                          else if([iq elementForName:@"query" xmlns:@"http://jabber.org/protocol/disco#info"])
                          {
                              NSXMLElement *query = [iq childElement];
                              NSXMLElement *identity = [query elementForName:@"identity"];
                              if([[identity attributeStringValueForName:@"category"] isEqualToString:@"conference"])
                              {
                                  groupChatDomain = [iq fromStr];
                              }
                          }
                      }
                  }
                  

                  最后,當我們得到群??聊域后,我們可以像這樣創建聊天室:

                  Finally, when we got group chat domain we can create chat room something like this:

                  XMPPJID *chatRoomJID = [XMPPJID jidWithUser:@"chat_room" 
                                                       domain:groupChatDomain 
                                                     resource:@"user"];
                  XMPPRoomMemoryStorage *roomMemoryStorage = [[XMPPRoomMemoryStorage alloc] init];
                  XMPPRoom *xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:roomMemoryStorage
                                                                         jid:roomChatJID
                                                               dispatchQueue:dispatch_get_main_queue()];
                  [xmppRoom activate:xmppStream];
                  [xmppRoom addDelegate:self delegateQueue:dispatch_get_main_queue()];
                  [xmppRoom joinRoomUsingNickname:user history:nil];
                  

                  并在您的視圖控制器及其委托中添加 <XMPPRoomDelegate> 協議:

                  and add <XMPPRoomDelegate> protocol in your view controller and its delegates:

                  - (void)xmppRoomDidCreate:(XMPPRoom *)sender
                  - (void)xmppRoomDidDestroy:(XMPPRoom *)sender
                  - (void)xmppRoom:(XMPPRoom *)sender didConfigure:(XMPPIQ *)iqResult
                  - (void)xmppRoom:(XMPPRoom *)sender didNotConfigure:(XMPPIQ *)iqResult
                  - (void)xmppRoomDidJoin:(XMPPRoom *)sender
                  - (void)xmppRoomDidLeave:(XMPPRoom *)sender
                  - (void)xmppRoom:(XMPPRoom *)sender occupantDidJoin:(XMPPJID *)occupantJID withPresence:(XMPPPresence *)presence
                  - (void)xmppRoom:(XMPPRoom *)sender occupantDidLeave:(XMPPJID *)occupantJID withPresence:(XMPPPresence *)presence
                  - (void)xmppRoom:(XMPPRoom *)sender didReceiveMessage:(XMPPMessage *)message fromOccupant:(XMPPJID *)occupantJID
                  

                  注意:在邀請其他用戶加入聊天室之前,您必須發送并確認房間配置(可以邀請其他用戶,但不能發送消息).
                  因此,您可以在創建 Room 后執行此操作(調用委托 - (void)xmppRoomDidCreate:(XMPPRoom *)sender)或您的用戶已加入(委托 - (void)xmppRoomDidJoin:(XMPPRoom *)sender 被調用)到聊天室.

                  要發送和確認房間配置,請執行以下操作之一:

                  Note: Before inviting other users to Chat Room, you have to send and confirm room configurations (other users can be invited but messages can not be sent).
                  So you can do this after Room is created (delegate - (void)xmppRoomDidCreate:(XMPPRoom *)sender is called) or your user has joined (delegate - (void)xmppRoomDidJoin:(XMPPRoom *)sender is called) to Chat Room.

                  To send and confirm room configuration do one of the following:

                  - (void)xmppRoomDidCreate:(XMPPRoom *)sender
                  {
                      [sender configureRoomUsingOptions:nil];
                  }
                  

                  - (void)xmppRoomDidJoin:(XMPPRoom *)sender
                  {    
                      [sender configureRoomUsingOptions:nil];
                  }
                  

                  發送 nil 以接受默認選項,或者您可以將語法如下的 IQ 發送到您的服務器:

                  Send nil to accept default options or you can send IQ with syntax as below to your server:

                  <iq type='set' from='user@jabber.server.com/resource' id='some_expression' to='chat_room@conference.jabber.server.com'>
                      <query xmlns='http://jabber.org/protocol/muc#owner'>
                          <x xmlns='jabber:x:data' type='submit'>
                              <field var='FORM_TYPE'>
                                  <value>http://jabber.org/protocol/muc#roomconfig</value>
                              </field>
                              <field var='muc#roomconfig_roomname'>
                                  <value>My Chat Room</value>
                              </field>
                                .
                                .
                                .
                          <x>
                  </query>
                  </iq>
                  

                  或目標c代碼:

                  NSError *error = nil;
                  NSXMLElement *query = [[NSXMLElement alloc] initWithXMLString:@"<query xmlns='http://jabber.org/protocol/muc#owner'/>" 
                                                                          error:&error];
                  NSXMLElement *x = [NSXMLElement elementWithName:@"x" 
                                                            xmlns:@"jabber:x:data"];
                  [x addAttributeWithName:@"type" stringValue:@"submit"];
                  NSXMLElement *field1 = [NSXMLElement elementWithName:@"field"];
                  [field1 addAttributeWithName:@"var" stringValue:@"FORM_TYPE"];
                  NSXMLElement *value1 = [NSXMLElement elementWithName:@"value" 
                                                           stringValue:@"http://jabber.org/protocol/muc#roomconfig"];
                  [field1 addChild:value1];
                  
                  NSXMLElement *field2 = [NSXMLElement elementWithName:@"field"];
                  [field2 addAttributeWithName:@"var" stringValue:@"muc#roomconfig_roomname"];
                  NSXMLElement *value2 = [NSXMLElement elementWithName:@"value" 
                                                           stringValue:@"My Chat Room"];
                  [field2 addChild:value2];
                  
                  //Add other fields you need, just like field1 and field2
                  
                  [x addChild:field1];
                  [x addChild:field2];
                  
                  [query addChild:x];
                  
                  NSXMLElement *roomOptions = [NSXMLElement elementWithName:@"iq"];
                  [roomOptions addAttributeWithName:@"type" stringValue:@"set"];
                  [roomOptions addAttributeWithName:@"id" stringValue:[xmppStream generateUUID];
                  [roomOptions addAttributeWithName:@"to" stringValue:@"chat_room@conference.jabber.server.com"];
                  
                  [roomOptions addChild:query];
                  
                  [sender configureRoomUsingOptions:roomOptions];
                  

                  所有可能的配置表單字段列表是這里

                  and list of all possible Configuration Form fields is here

                  這篇關于創建 xmpp muc 房間時遇到問題:代碼 503(服務不可用)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to animate a UIImageview to display fullscreen by tapping on it?(如何通過點擊動畫 UIImageview 以顯示全屏?)
                  To stop segue and show alert(停止 segue 并顯示警報)
                  iOS 5 storyboard, programmatically determine path(iOS 5 故事板,以編程方式確定路徑)
                  Icon already includes gloss effects(圖標已經包含光澤效果)
                  How does UIEdgeInsetsMake work?(UIEdgeInsetsMake 是如何工作的?)
                  UIProgressView and Custom Track and Progress Images (iOS 5 properties)(UIProgressView 和自定義跟蹤和進度圖像(iOS 5 屬性))

                  <small id='Viwov'></small><noframes id='Viwov'>

                    <tfoot id='Viwov'></tfoot>

                      <legend id='Viwov'><style id='Viwov'><dir id='Viwov'><q id='Viwov'></q></dir></style></legend>
                      <i id='Viwov'><tr id='Viwov'><dt id='Viwov'><q id='Viwov'><span id='Viwov'><b id='Viwov'><form id='Viwov'><ins id='Viwov'></ins><ul id='Viwov'></ul><sub id='Viwov'></sub></form><legend id='Viwov'></legend><bdo id='Viwov'><pre id='Viwov'><center id='Viwov'></center></pre></bdo></b><th id='Viwov'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Viwov'><tfoot id='Viwov'></tfoot><dl id='Viwov'><fieldset id='Viwov'></fieldset></dl></div>

                          <bdo id='Viwov'></bdo><ul id='Viwov'></ul>

                              <tbody id='Viwov'></tbody>

                            主站蜘蛛池模板: 久久久国产精品视频 | 国产一区二区在线免费观看 | 日韩欧美久久 | 精品欧美一区二区在线观看欧美熟 | 久久久国产精品一区 | av高清| 欧美激情a∨在线视频播放 成人免费共享视频 | 超碰97人人人人人蜜桃 | 亚洲福利电影网 | 欧美黄色网络 | 在线一区视频 | 亚洲欧洲一区二区 | 午夜精品福利视频 | 人人干人人干人人干 | 91高清视频在线观看 | 日韩在线视频免费观看 | 亚洲成人国产精品 | 一级国产精品一级国产精品片 | 性生生活大片免费看视频 | 久久久网| 亚洲一区成人 | 自拍第1页 | 一呦二呦三呦国产精品 | 免费看黄色国产 | 亚洲精品在线免费看 | 国产在线播放一区二区三区 | 欧美色专区 | 成人国产免费视频 | 精品久久久久久 | 亚洲精视频 | 中文字幕在线观看www | 日日夜夜免费精品视频 | 国产精品视频偷伦精品视频 | 日韩亚洲欧美综合 | 激情免费视频 | 国产高清精品在线 | 色影视| 国产成人精品一区二三区在线观看 | 日韩欧美网| 欧美炮房| 日日噜噜夜夜爽爽狠狠 |