Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
kostrin #1
Member since May 2013 · 9 posts
Group memberships: Members
Show profile · Link to this post
Subject: Minimal required connection code to conect with Openfire server
I'm trying to connect to my local openfire server with all the default configurations. I'm not getting any errors and things are printing to my event log as expected. HOWEVER, on my openfire server the user is not online as expected.  I know there is alot of extra code but I wanted to make sure all the settings are correct. What can I cut to minimalize it and what is preventing me from getting my openfire user online?

Here is my code:

  1. public void login()
  2. {
  3.     try
  4.     {
  5.       client = new XmppClient();
  6.       client.Username = username;
  7.       client.XmppDomain ="jabber.server.de";
  8.       client.Password= password;
  9.       client.Hostname= "jabber.server.de";
  10.       client.Port = 5222;
  11.       client.Priority = 100;
  12.  
  13.       //client.Transport = Matrix.Net.Transport.BOSH;
  14.      
  15.       client.Status = "Working!";
  16.       //client.Show= Matrix.Xmpp.Show.chat;
  17.       client.AutoPresence = false;
  18.       client.Priority = 1;
  19.       client.Status = "online";
  20.       client.Show = Matrix.Xmpp.Show.NONE;
  21.       client.ProxyType = Matrix.Net.Proxy.ProxyType.None;
  22.       Logger.log(client.Username + "\n" + client.Password + "\n" + client.XmppDomain);
  23.       // client.OnLogin += new EventHandler<Matrix.EventArgs>(xmppClient_onLogin);
  24.       // client.OnSendXml += new EventHandler<Matrix.TextEventArgs>(xmppClient_OnSendXml);
  25.       client.Open();
  26.     }
  27.      catch (Exception e)
  28.     {
  29.         Logger.log(e.ToString());
  30.     }
  31. }
Thanks in advance for the help!
This post was edited on 2013-05-13, 22:32 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you have set AutoPresence to false. This means MatriX does not send your presence which is the reason why you are offline.

Alex
Avatar
kostrin #3
Member since May 2013 · 9 posts
Group memberships: Members
Show profile · Link to this post
Thanks for the quick response Alex. I removed that line of code but I'm still not getting the client session active. Is there anything else you could see as being wrong? Also, what is the bare minimum I need to connect?
Thanks
This post was edited on 2013-05-13, 23:40 by kostrin.
Avatar
kostrin #4
Member since May 2013 · 9 posts
Group memberships: Members
Show profile · Link to this post
Actually I figured it out. But you were very helpful. It was a domain error. Thanks!
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: agsXMPP RSS