Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
bvelasquez #1
Member since Aug 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Client disconnecting after a time.
Connecting to Google Talk, my client connection disconnects after some time and shows offline.  How can I ensure the client remains online all the time?

Thanks

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

the client must stay online until you disconnect.
Get you please post your debug xml and subscribe to all error handlers?
I assume your connection gets closed because an error occurs.

Alex
Alexander Gnauck
AG-Software
Avatar
javanesevn #3
Member since Apr 2008 · 74 posts · Location: Japan
Group memberships: Members
Show profile · Link to this post
In reply to post #1
Hi,

Does you set timer to force disconnect from server?
Avatar
Alex #4
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
no,
the connection stays online until you send unavailable presence and close it properly.

Alex
Alexander Gnauck
AG-Software
Avatar
bvelasquez #5
Member since Aug 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
I did what was suggested and I see no errors.  The state is changing constantly from:

Connected
Disconnected
Connecting

Over and over it is doing this.  Not sure why.  Is it possible that the google talk server is disconnecting the client?
Avatar
Alex #6
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
can you please attach your complete Xml logs which include the connect and disconnect?
Maybe we can see what happens then.

Thanks,
Alex
Alexander Gnauck
AG-Software
Avatar
bvelasquez #7
Member since Aug 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
I did notice that I am getting a "Too many stanzas per hour" message.  Any clue on why I would get this.  Shortly after, the client disconnects.

Thanks

Barry
Avatar
Alex #8
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
most servers have a setting for this which is called karma or rate limiting. If you run your own server you can easily adjust it.
If you have a huge roster or your app is a bot you can hit this limitation pretty fast.

The most public servers set this limits very strict because they don't want bot software and commercial services on their servers.

Alex
Alexander Gnauck
AG-Software
Avatar
bvelasquez #9
Member since Aug 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
Could this happen then if you set the Keep Alive to low?  Would the keep alive message count towards this limit?  I'm using Google Servers right now.  Maybe their limits are too low.
Avatar
Alex #10
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
For keep alives agsXMPP is sending only 1 byte (space character) after 2 minutes of inactivity.

Use the OnReadXml and OnWriteXml handlers to calculate the traffic of your connection.

Alex
Alexander Gnauck
AG-Software
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 SDK Support RSS