Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
Lightbarrier #1
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Subject: Retrieve All Subdomains on a Server
Hey Alex,

Thanks for all your help, I was wondering if there was good way to retrieve all the subdomains that exist on a server, that way you don't have to know what subdomains you can connect to before you log in?

I've done some digging in the xmpp documentation, but haven't found anything particularly useful to fit this purpose.  

Thanks again.
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you please elaborate on what you exactly mean by subdomains?
Do you mean subdomains like pubsub.myserver.com or muc.myserver.com for the pubsub and Group chat services?

Alex
Avatar
Lightbarrier #3
Member since Jul 2014 · 52 posts
Group memberships: Members
Show profile · Link to this post
Subject: Like Conference
I suppose I would mean like those used for group chat services.

For example:roomName@conference.serverDomain.com
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You get those over Service Discovery (Disco).

here is an example:

  1. void DiscoServer()
  2. {
  3.     _dm = new DiscoManager(XmppClient);
  4.     _dm.DiscoverItems(XmppClient.XmppDomain, new EventHandler<IqEventArgs>(DiscoItemsResult));
  5. }
  6.  
  7. void DiscoItemsResult(object sender, IqEventArgs e)
  8. {
  9.     var query = e.Iq.Element<Matrix.Xmpp.Disco.Items>();
  10.     if (query != null)
  11.     {
  12.         foreach (var itm in query.GetItems())
  13.         {
  14.             //_dm.DiscoverInformation(itm.Jid, itm.Node);
  15.             _dm.DiscoverInformation(itm.Jid, itm.Node, new EventHandler<IqEventArgs>(DiscoInfoResult));
  16.         }
  17.     }
  18. }
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS