Not logged in. · Lost password · Register
Forum: XMPP Protocol RSS
liyasker #1
Member since Jan 2006 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Same XMPPClientconnection object for Register & login ?
Can i use same XMPPClientConnection Object for Registeration and Login to WildFire XMPP Server?

[I am using agsxmpp and wildfire XMPPServer ]

              LoginClientConnection.Username = loginUserID.User.ToString();
               LoginClientConnection.Server = loginUserID.Server.ToString();
               LoginClientConnection.Password = password;
               LoginClientConnection.Port =5233\ 5222;
               LoginClientConnection.UseSSL =true\ false ;
               LoginClientConnection.RegisterAccount = true\false;
               // Open the connection
               // it wait's Until the connection is completed
               while (LoginClientConnection.XmppConnectionState.ToString   () !   ="connected" \ "SessionStarted")

After register a new user i close the XMPPClient connection using



then i will change the proberty in to (5222,false,false)
and then i am waiting till the connectionstate is changed to "SessionStarted"

but the connection state doest move from "connected" in the loop

what is the problem?

But in the same process if i use separate XMPPClientconnectionObject then it works.

What is the problem? and How to register and then close and then login the connection using same object?


Alex #2
Member since Feb 2003 · 4274 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post

yes you can. When you register a account the library will login with the new registered account automatically. You don't have to close the connection and open it again.
We have improved the registration code in the latest release. So make sure you use the latest code of agXMPP.

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: