Client disconnecting after a time.
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?
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.
Does you set timer to force disconnect from server?
the connection stays online until you send unavailable presence and close it properly.
Over and over it is doing this. Not sure why. Is it possible that the google talk server is disconnecting the client?
can you please attach your complete Xml logs which include the connect and disconnect?
Maybe we can see what happens then.
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.
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.
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.
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.