Not logged in. · Lost password · Register
Forum: agsXMPP RSS
preky #1
Member since Jan 2006 · 17 posts
Group memberships: Members
Show profile · Link to this post
Subject: Closing connection...reconnecting
I have noticed that if I have XmppClientConnection opened while user was trying to loggin and authentification failed I have to close, dispose connection and then recreate it and bind events again so I could try to loggin user again. Just closing connection and opening it again doesn't work.

while creating XmppClientConnection, it's global member in my class, I was attaching all events needed. After failing authentification I was closing it in OnAuthError event. Next time user is trying to connect with valid data, events are not fired.

Maybe I'm doing something wrong... is there a better way can somebody tell me, please...

Maybe methods Login, Logoff, Reconnect should be implemented as well, or I haven't found them yet in huge documentation :)

Thx to the Ag-Software crew! :)
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi preky,

this works for me in the MiniClient.
Login ==> XmppConnection.Open
LogOff ==> XmppConnection.Close

Can't remember why we named the functions Open and Close, but i assume we had a good reason ;-)

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