powered by Jive Software

Smack 1.3.0 packet reply timeout?

In the changelog for 1.3.0, the following is listed:

(SMACK-107) Allow packet reply timeout to be set

What exactly is this, how is it set, and how is it used?

Mike

Mike,

In many occasions when you send a packet to the server you need to wait for a response. In previous Smack versions it was hardcoded to wait up to 5 seconds for a response. If no response was received during that time an exception is raised.

In Smack 1.3.0 you can set the value to wait for a response from the server. You will need to change the default value when for example your internet connection is overloaded (too slow).

There are two ways to set a new timeout. 1) Use the static method SmackConfiguration.setPacketReplyTimeout(int) or 2) In smack-config.xml modify the entry 5000

Regards,

– Gato

Thanks